protected void btnSave_Click(object sender, EventArgs e) //button Save { lblMsg.Text = lblMsg.CssClass = ""; if (!CommonCls.CheckGUIDIsValid()) { return; } objSundriModel = new SundriesModel(); objSundriModel.Ind = 3; objSundriModel.OrgID = GlobalSession.OrgID; objSundriModel.TblSundries = CreateAccountHeadData(); string uri = string.Format("Sundri/SaveChkAllocated"); DataTable dtSaveItem = CommonCls.ApiPostDataTable(uri, objSundriModel); if (dtSaveItem.Rows.Count > 0) { ShowMessage("Data Save Successfully!", true); } else { ShowMessage("Data Not Save Successfully!", false); } }
public DataTable SaveChkAllocated(SundriesModel ObjSundriModel) { // objGroupTypeDA = new GroupTypeMasterDataAcess(); DataTable SaveItem = objSundriDA.SaveChkAllocated(ObjSundriModel); return(SaveItem); }
public DataTable MatchInd(SundriesModel ObjSundriModel) { // objGroupTypeDA = new GroupTypeMasterDataAcess(); DataTable MatchItem = objSundriDA.MatchSelectedInd(ObjSundriModel); return(MatchItem); }
public int MatchInd(string SelectedValue) { objSundriModel = new SundriesModel(); objSundriModel.Ind = 2; objSundriModel.OrgID = GlobalSession.OrgID; objSundriModel.SundriCode = int.Parse(SelectedValue); string uri = string.Format("Sundri/MatchInd"); DataTable dsMatchInd = CommonCls.ApiPostDataTable(uri, objSundriModel); return(int.Parse(dsMatchInd.Rows[0]["InvoiceCnt"].ToString())); }
public DataSet ChkList(SundriesModel ObjSundriModel) { //DataSet dsAvailablelist = new DataSet(); ObjSundriModel.Ind = 1; DataSet dtAvailable = objSundriDA.LoadChkListAvailable(ObjSundriModel); dtAvailable.Tables[0].TableName = "AvailableList"; dtAvailable.Tables[1].TableName = "AllocatedList"; return(dtAvailable); }
private void Loadchklist() { try { objSundriModel = new SundriesModel(); objSundriModel.OrgID = GlobalSession.OrgID; objSundriModel.YrCD = GlobalSession.YrCD; string uri = string.Format(" Sundri/ChkList"); DataSet dsChklist = CommonCls.ApiPostDataSet(uri, objSundriModel); if (dsChklist.Tables.Count > 0) { DataTable dtChkAviable = dsChklist.Tables["AvailableList"]; DataTable dtChkAllocated = dsChklist.Tables["AllocatedList"]; ViewState["dtCheckListAvailable"] = dtChkAviable; chkAvailable.DataSource = dtChkAviable; chkAvailable.DataTextField = "AccName"; chkAvailable.DataValueField = "AccCode"; chkAvailable.DataBind(); ChkSelected.DataSource = dtChkAllocated; ChkSelected.DataTextField = "SundriHeadName"; ChkSelected.DataValueField = "AccCode"; ChkSelected.DataBind(); if (dtChkAllocated.Columns.Count > 0) { ViewState["CheckListViewSelect"] = dtChkAllocated; } else { } //chkAvailable.Items.Insert(0, new ListItem("-- Select --", "0")); } } catch (Exception ex) { } }
internal DataTable SaveChkAllocated(SundriesModel ObjSundriModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSundries"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjSundriModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjSundriModel.OrgID); //ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjSundriModel.YrCD); // ClsCon.cmd.Parameters.AddWithValue("@AccCode", ObjSundriModel.SundriCode); ClsCon.cmd.Parameters.AddWithValue("@TblSundries", ObjSundriModel.TblSundries); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtmatche = new DataTable(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtmatche); dtmatche.TableName = "success"; } catch (Exception) { dtmatche = new DataTable(); dtmatche.TableName = "error"; return(dtmatche); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtmatche); }
internal DataSet LoadChkListAvailable(SundriesModel ObjSundriModel) { try { ClsCon.cmd = new SqlCommand(); ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.CommandText = "SPSundries"; ClsCon.cmd.CommandType = CommandType.StoredProcedure; ClsCon.cmd.Parameters.AddWithValue("@Ind", ObjSundriModel.Ind); ClsCon.cmd.Parameters.AddWithValue("@OrgID", ObjSundriModel.OrgID); ClsCon.cmd.Parameters.AddWithValue("@YrCD", ObjSundriModel.YrCD); con = ClsCon.SqlConn(); ClsCon.cmd.Connection = con; dtCheckList = new DataSet(); ClsCon.da = new SqlDataAdapter(ClsCon.cmd); ClsCon.da.Fill(dtCheckList); //dtCheckList.TableName = "success"; } catch (Exception) { dtCheckList = new DataSet(); // dtCheckList.TableName = "error"; return(dtCheckList); } finally { con.Close(); con.Dispose(); ClsCon.da.Dispose(); ClsCon.cmd.Dispose(); } return(dtCheckList); }