public ArrayList GetReasonCode(string StoreID, short Type) { RPDatasets.RPDataset1TableAdapters.Setup_Reason_CodesTableAdapter setup_Reason_CodesTableAdapter = new Setup_Reason_CodesTableAdapter { Connection = DAO.DataProvider.ConnectionData(StaticClass.RPServer) }; DataTable dataTable = setup_Reason_CodesTableAdapter.GetData(StaticClass.storeId, Type); ArrayList reasonlist = new ArrayList(); for (int i = 0; i < dataTable.Rows.Count; i++) { ReasonCode reasonCode = new ReasonCode(dataTable.Rows[i]["Reason_Code"].ToString(), Convert.ToInt32(dataTable.Rows[i]["Reason_Type"])); reasonlist.Add(reasonCode); } return(reasonlist); }
private void button3_Click(object sender, EventArgs e) { RPDatasets.RPDataset1TableAdapters.Setup_Reason_CodesTableAdapter setup_Reason_CodesTableAdapter = new Setup_Reason_CodesTableAdapter {Connection = DAO.DataProvider.ConnectionData(StaticClass.RPServer)}; foreach (ReasonCode o in ReasonCodeList) { if(o.isDelete&&!o.isNew) { setup_Reason_CodesTableAdapter.Delete(StaticClass.storeId, o.Code, ReasonCode.KitchenNote); } else if(o.isNew&&!o.isDelete) { setup_Reason_CodesTableAdapter.InsertReasonCode(StaticClass.storeId, o.Code, ReasonCode.KitchenNote); } } this.Dispose(); }
private void button3_Click(object sender, EventArgs e) { RPDatasets.RPDataset1TableAdapters.Setup_Reason_CodesTableAdapter setup_Reason_CodesTableAdapter = new Setup_Reason_CodesTableAdapter { Connection = DAO.DataProvider.ConnectionData(StaticClass.RPServer) }; foreach (ReasonCode o in ReasonCodeList) { if (o.isDelete && !o.isNew) { setup_Reason_CodesTableAdapter.Delete(StaticClass.storeId, o.Code, ReasonCode.KitchenNote); } else if (o.isNew && !o.isDelete) { setup_Reason_CodesTableAdapter.InsertReasonCode(StaticClass.storeId, o.Code, ReasonCode.KitchenNote); } } this.Dispose(); }
public ArrayList GetReasonCode(string StoreID,short Type) { RPDatasets.RPDataset1TableAdapters.Setup_Reason_CodesTableAdapter setup_Reason_CodesTableAdapter = new Setup_Reason_CodesTableAdapter {Connection = DAO.DataProvider.ConnectionData(StaticClass.RPServer)}; DataTable dataTable = setup_Reason_CodesTableAdapter.GetData(StaticClass.storeId, Type); ArrayList reasonlist = new ArrayList(); for (int i = 0; i < dataTable.Rows.Count; i++) { ReasonCode reasonCode = new ReasonCode(dataTable.Rows[i]["Reason_Code"].ToString(), Convert.ToInt32(dataTable.Rows[i]["Reason_Type"])); reasonlist.Add(reasonCode); } return reasonlist; }