コード例 #1
0
    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);
        }
    }
コード例 #2
0
        public DataTable SaveChkAllocated(SundriesModel ObjSundriModel)
        {
            // objGroupTypeDA = new GroupTypeMasterDataAcess();

            DataTable SaveItem = objSundriDA.SaveChkAllocated(ObjSundriModel);

            return(SaveItem);
        }
コード例 #3
0
        public DataTable MatchInd(SundriesModel ObjSundriModel)
        {
            // objGroupTypeDA = new GroupTypeMasterDataAcess();

            DataTable MatchItem = objSundriDA.MatchSelectedInd(ObjSundriModel);

            return(MatchItem);
        }
コード例 #4
0
    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()));
    }
コード例 #5
0
        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);
        }
コード例 #6
0
    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)
        {
        }
    }
コード例 #7
0
        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);
        }
コード例 #8
0
        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);
        }