| | |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | public DAL.ClsHR_EmployeeSkillBill oBill = new DAL.ClsHR_EmployeeSkillBill(); |
| | | public DAL.ClsHR_EmployeeSkillBill BillNew = new DAL.ClsHR_EmployeeSkillBill(); //对åºåæ®ç±» |
| | | public DAL.ClsHR_EmployeeSkillBill BillOld = new DAL.ClsHR_EmployeeSkillBill(); //对åºåæ®ç±» |
| | | |
| | | public DAL.ClsHR_EmployeeSkillBill BillOld = new DAL.ClsHR_EmployeeSkillBill(); //对åºåæ®ç±» |
| | | Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); //è·åç³»ç»åæ° |
| | | // HR_EmployeeSkillBill HR_EmployeeSkillBillMain |
| | | #region åå·¥æè½æ¸
åå表 |
| | | /// <summary> |
| | |
| | | |
| | | //å é¤åæ§å¶========================================= |
| | | string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + HMaker + "'"; |
| | | ds = oCn.RunProcReturn(sql1, "h_p_YS_ReceiveOtherBill_BeforeDelCtrl"); |
| | | ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeDelCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //ä½åºåæ§å¶========================================= |
| | | string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; |
| | | ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeDropCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :å®¡æ ¸åå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "å®¡æ ¸å¤±è´¥!åå :" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | //ä½åºåæ® |
| | | if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) |
| | | if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | //åä½åºåæ§å¶========================================= |
| | | string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'"; |
| | | ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeUnDropCtrl"); |
| | | if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥!åå :åä½åºåå¤æå¤±è´¥ï¼è¯·ä¸ç½ç»ç®¡ç人åèç³»"; |
| | | objJsonResult.data = null; |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0") |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä½åºå¤±è´¥!åå :" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ; |
| | | objJsonResult.data = null; |
| | | oCn.RollBack(); |
| | | return objJsonResult; |
| | | } |
| | | //================================================================================== |
| | | //åä½åºåæ® |
| | | if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo)) |
| | | if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | |
| | | } |
| | | |
| | | //è¿ååè¡¨ä¿¡æ¯ |
| | | ds = oCn.RunProcReturn("select * from h_v_HR_EmployeeSkillBillMainList where 1=1 and hmainid=" + HInterID + " order by hmainid desc", "h_v_HR_EmployeeSkillBillMainList"); |
| | | ds = oCn.RunProcReturn("select * from h_v_HR_EmployeeSkillBillMainEdit where 1=1 and hmainid=" + HInterID + " order by hmainid desc", "h_v_HR_EmployeeSkillBillMainEdit"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | |
| | | bResult = false; |
| | | } |
| | | if (bResult) |
| | | { |
| | | { |
| | | //èªå¨å®¡æ ¸è®¾ç½® |
| | | if (refSav == "Add") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //è¿å主ID |
| | | //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | string sReturn = ""; |
| | | if (oSystemParameter.ShowBill(ref sReturn) == true) |
| | | { |
| | | if (oSystemParameter.omodel.HR_EmployeeSkillBill_AutoCheck == "Y") //ç³»ç»åæ° èªå¨å®¡æ ¸ |
| | | { |
| | | objJsonResult.Verify = "Y"; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | if (refSav == "Update") |
| | | { |
| | | objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //è¿å主ID |
| | | objJsonResult.Verify = "N"; |
| | | } |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "ä¿åæåï¼"; |
| | |
| | | objJsonResult.data = 1; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |