private string SaveWorkDetail() { try { Qz_job_proof_list list = new Qz_job_proof_list(); list.OID = Post("LIST_OID"); if (list.OID == "") { list.OID = Guid.NewGuid().ToString(); } ds.RetrieveObject(list); list.SEQ_NO = Get("seq_no"); list.WORK_DATE = Post("WORK_DATE"); list.WORK_START_TIME = Post("WORK_START_TIME"); list.WORK_END_TIME = Post("WORK_END_TIME"); list.WORK_HOURS = comTran.ToDecimal(Post("WORK_HOURS")); list.WORK_TASK = Post("WORK_TASK"); list.JOB_SEQ_NO = Post("JOB_SEQ_NO"); ds.UpdateObject(list); decimal reward = JobProofHandleClass.getInstance().CalculateReward(list.SEQ_NO); ds.ExecuteTxtNonQuery(string.Format("UPDATE QZ_JOB_PROOF_HEAD SET REWARD = {1} WHERE SEQ_NO = '{0}'", list.SEQ_NO, reward)); //return list.OID + ";" + list.SEQ_NO; return(Math.Round(reward, 2).ToString()); } catch (Exception ex) { return(string.Empty); } }
private string DeleteWorkDetail() { var oid = Get("id"); if (string.IsNullOrEmpty(oid)) { return("主键为空,不允许删除操作"); } Qz_job_proof_list list = new Qz_job_proof_list(); list.OID = oid; ds.RetrieveObject(list); bool bDel = false; var transaction = ImplementFactory.GetDeleteTransaction <Qz_job_proof_list>("Qz_job_proof_listDeleteTransaction"); transaction.EntityList.Add(list); bDel = transaction.Commit(); if (!bDel) { return(string.Empty); } else { decimal reward = JobProofHandleClass.getInstance().CalculateReward(list.SEQ_NO); ds.ExecuteTxtNonQuery(string.Format("UPDATE QZ_JOB_PROOF_HEAD SET REWARD = {1} WHERE SEQ_NO = '{0}'", list.SEQ_NO, reward)); return(Math.Round(reward, 2).ToString()); } }
private string Check() { string result = string.Empty; bool iscan = JobProofHandleClass.getInstance().IsCan(out result); return(result); }