public void Delete(RequisitionHeaderModel model) { string sql = @"DELETE FROM po_requisition_headers_all WHERE requisition_header_id = @requisition_header_id"; object[] parms = { "@requisition_header_id", model.RequisitionHeaderId }; db.Update(sql, parms); }
private void MapReqHeaderRowAndModel(DataRow dr, RequisitionHeaderModel m) { m.Category = dr["TA001"].ToString(); m.Code = dr["TA002"].ToString(); m.BuyFromDepartment = dr["TA004"].ToString(); m.BuyingDate = dr["TA003"].ToString(); m.Auditor = dr["TA014"].ToString(); m.BuyingPerson = dr["TA012"].ToString(); m.Memo = dr["TA006"].ToString(); m.RequisitionDate = dr["TA013"].ToString(); m.TotalCount = dr["TA011"].ToString(); }
public void Update(RequisitionHeaderModel model) { string sql = @"UPDATE po_requisition_headers_all SET requisition_number = @requisition_number ,requisition_date = @requisition_date ,requester_id = @requester_id ,type_lookup_code = @type_lookup_code ,job_process_flag = @job_process_flag ,last_update_date = @last_update_date ,last_updated_by = @last_updated_by ,segment1 = @segment1 ,summary_flag = @summary_flag ,enabled_flag = @enabled_flag ,segment2 = @segment2 ,segment3 = @segment3 ,segment4 = @segment4 ,segment5 = @segment5 ,project_number = @project_number ,start_date_active = @start_date_active ,end_date_active = @end_date_active ,last_update_login = @last_update_login ,creation_date = @creation_date ,created_by = @created_by ,description = @description ,attribute1 = @attribute1 ,attribute2 = @attribute2 ,attribute3 = @attribute3 ,attribute4 = @attribute4 ,attribute5 = @attribute5 ,cancel_flag = @cancel_flag ,org_id = @org_id ,authorization_status = @authorization_status ,note_to_authorizer = @note_to_authorizer ,approved_date = @approved_date ,bom_id = @bom_id ,cost_id = @cost_id ,revision_num = @revision_num ,purchased_flag = @purchased_flag ,total_amount = @total_amount ,approver_id = @approver_id ,status = @status ,approved_flag = @approved_flag ,submit_flag = @submit_flag ,sent_po_confirm_flag = @sent_po_confirm_flag ,po_confirm_flag = @po_confirm_flag WHERE requisition_header_id = @requisition_header_id"; db.Update(sql, Take(model)); }
private object[] Take(RequisitionHeaderModel model) { return(new object[] { "@requisition_header_id", model.RequisitionHeaderId, "@requisition_number", model.RequisitionNumber, "@requisition_date", model.RequisitionDate, "@requester_id", model.RequesterId, "@type_lookup_code", model.TypeLookupCode, "@job_process_flag", model.JobProcessFlag, "@last_update_date", model.LastUpdateDate, "@last_updated_by", model.LastUpdatedBy, "@segment1", model.Segment1, "@summary_flag", model.SummaryFlag, "@enabled_flag", model.EnabledFlag, "@segment2", model.Segment2, "@segment3", model.Segment3, "@segment4", model.Segment4, "@segment5", model.Segment5, "@project_number", model.ProjectNo, "@start_date_active", model.StartDateActive, "@end_date_active", model.EndDateActive, "@last_update_login", model.LastUpdateLogin, "@creation_date", model.CreationDate, "@created_by", model.CreatedBy, "@description", model.Description, "@attribute1", model.Attribute1, "@attribute2", model.Attribute2, "@attribute3", model.Attribute3, "@attribute4", model.Attribute4, "@attribute5", model.Attribute5, "@cancel_flag", (model.CancelFlag) ? "Y" : "N", "@org_id", model.OrgId, "@authorization_status", model.AuthorizationStatus, "@note_to_authorizer", model.NoteToAuthorizer, "@approved_date", model.ApprovedDate, "@bom_id", model.BomId, "@cost_id", model.CostId, "@revision_num", model.RevisionNum, "@purchased_flag", (model.PurchasedFlag) ? "Y" : "N", "@total_amount", model.TotalAmount, "@approver_id", model.ApproverId, "@status", model.Status, "@approved_flag", (model.ApprovedFlag) ? "Y" : "N", "@submit_flag", (model.SubmitFlag) ? "Y" : "N", "@sent_po_confirm_flag", (model.SentPoConfirmFlag) ? "Y" : "N", "@po_confirm_flag", (model.PoConfirmedFlag) ? "Y" : "N" }); }
private void Find_Requistion(object sender, EventArgs e) { if (!string.IsNullOrEmpty(_view.requisitionNumber)) { RequisitionHeaderModel reqhead = _repository.GetHeadByNumber(_view.requisitionNumber); if (reqhead != null) { _view.reqheadParam = reqhead; } else { _view.reqheadParam = null; } } else { _view.reqheadParam = null; } if (_view.reqheadParam != null) { _view.requisitionNumber = _view.reqheadParam.RequisitionNumber; return; } else { using (RequisitionListForm frm = new RequisitionListForm(null)) { frm.ShowDialog(); if (frm.prsSelected != null) { _view.reqheadParam = frm.prsSelected.FirstOrDefault(); _view.requisitionNumber = _view.reqheadParam.RequisitionNumber; } else { _view.reqheadParam = null; } } } }
public int Insert(RequisitionHeaderModel model) { string sql = @"INSERT INTO po_requisition_headers_all (requisition_number, requisition_date, requester_id , type_lookup_code, job_process_flag, last_update_date , last_updated_by, segment1, summary_flag , enabled_flag, segment2, segment3 , segment4, segment5, project_number , start_date_active, end_date_active, last_update_login , creation_date, created_by, description , attribute1, attribute2, attribute3 , attribute4, attribute5, cancel_flag , org_id, authorization_status, note_to_authorizer , approved_date, bom_id, cost_id, revision_num , purchased_flag, total_amount, approver_id, status , submit_flag, approved_flag , sent_po_confirm_flag , po_confirm_flag) VALUES (@requisition_number, @requisition_date, @requester_id , @type_lookup_code, @job_process_flag, @last_update_date , @last_updated_by, @segment1, @summary_flag , @enabled_flag, @segment2, @segment3 , @segment4, @segment5, @project_number , @start_date_active, @end_date_active, @last_update_login , @creation_date, @created_by, @description , @attribute1, @attribute2, @attribute3 , @attribute4, @attribute5, @cancel_flag , @org_id, @authorization_status, @note_to_authorizer , @approved_date, @bom_id, @cost_id, @revision_num , @purchased_flag, @total_amount, @approver_id, @status , @submit_flag, @approved_flag , @sent_po_confirm_flag , @po_confirm_flag)"; return(db.Insert(sql, Take(model))); }
public void DeletePR(RequisitionHeaderModel model) { factory.RequisitionHeaderDao.Delete(model); }
public void UpdatePR(RequisitionHeaderModel model) { factory.RequisitionHeaderDao.Update(model); }
public int InsertPR(RequisitionHeaderModel model) { return(factory.RequisitionHeaderDao.Insert(model)); }