Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));

                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                lblProcesDate.Text = date;

                CodeDropdown();
                PartyDropdown();
                TruncateWF();

                CalculateAvgRate();
                DivStockView.Visible = false;
                btnBack.Visible      = false;

                ddlFromLocation.SelectedValue = "2";
                ddlToLocation.SelectedValue   = "1";

                divPost.Visible = false;
            }
        }
        protected void BtnUpdate_Click(object sender, EventArgs e)
        {
            if (ddlGroup.SelectedIndex != 0 && ddlItemType.SelectedIndex != 0 && ddlItemNo.SelectedIndex != 0)
            {
                A2ZSTOCKDTO objDTO = new A2ZSTOCKDTO();
                objDTO.STKItemCode     = Converter.GetInteger(ddlItemNo.SelectedValue);
                objDTO.STKItemName     = Converter.GetString(txtItemDesc.Text);
                objDTO.STKGroup        = Converter.GetInteger(ddlGroup.SelectedValue);
                objDTO.STKSubGroup     = Converter.GetInteger(ddlItemType.SelectedValue);
                objDTO.STKUnit         = Converter.GetInteger(ddlUnitMeasure.SelectedValue);
                objDTO.STKReOrderLevel = Converter.GetInteger(txtReorderLvl.Text);

                A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                objDTO.STKStatusDate = Converter.GetDateTime(dto.ProcessDate.ToLongDateString());

                int roweffect = A2ZSTOCKDTO.UpdateInformation(objDTO);
                if (roweffect > 0)
                {
                    clearInfo();

                    gvDetail();
                    gvDetailInfo.Visible = false;
                    BtnUpdate.Visible    = false;
                    BtnSubmit.Visible    = true;
                    Response.Redirect(Request.RawUrl);
                }
            }
        }
        protected void BtnView_Click(object sender, EventArgs e)
        {
            try
            {
                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");


                if (txtAccType.Text == string.Empty)
                {
                    //String csname1 = "PopupScript";
                    //Type cstype = GetType();
                    //ClientScriptManager cs = Page.ClientScript;

                    //if (!cs.IsStartupScriptRegistered(cstype, csname1))
                    //{
                    //    String cstext1 = "alert('Account Type  Not Abailabe' );";
                    //    cs.RegisterStartupScript(cstype, csname1, cstext1, true);
                    //}
                    ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('Account Type  Not Abailabe');", true);
                    return;
                }


                var    p           = A2ZERPSYSPRMDTO.GetParameterValue();
                string comName     = p.PrmUnitName;
                string comAddress1 = p.PrmUnitAdd1;

                SessionStore.SaveToCustomStore(Params.COMPANY_NAME, comName);
                SessionStore.SaveToCustomStore(Params.BRANCH_ADDRESS, comAddress1);
                SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NAME3, txtToDaysDate.Text);
                SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NAME2, ddlAcType.SelectedItem.Text);
                if (ChkZeroBalanceShow.Checked)
                {
                    SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NO2, 1);
                    SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NAME2, "With Zero Balance ");
                }

                else
                {
                    SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NO2, 0);
                    SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NAME2, "Only Balance ");
                }
                SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NO1, ddlAcType.SelectedValue);
                SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.COMMON_NAME1, ddlAcType.SelectedItem.Text);


                SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.REPORT_DATABASE_NAME_KEY, "A2ZCSMCUS");
                SessionStore.SaveToCustomStore(DataAccessLayer.Utility.Params.REPORT_FILE_NAME_KEY, "rptCSProvisionBalance");


                Response.Redirect("ReportServer.aspx", false);
            }

            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                txtProcessDate.Text = date;
                lblProcDate.Text    = date;


                A2ZHRPARAMETERDTO dto0 = A2ZHRPARAMETERDTO.GetParameterValue();
                DateTime          dt0  = Converter.GetDateTime(dto0.ProcessDate);
                hdnToDaysDate.Text = Converter.GetString(String.Format("{0:Y}", dt0));


                lblCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE));
                string    qry = "SELECT GLAccDesc FROM A2ZCGLMST where GLAccNo='" + lblCashCode.Text + "'";
                DataTable dt1 = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery(qry, "A2ZGLMCUS");
                if (dt1.Rows.Count > 0)
                {
                    lblBoothNo.Text   = lblCashCode.Text;
                    lblBoothName.Text = Converter.GetString(dt1.Rows[0]["GLAccDesc"]);
                }


                lblProcessDate.Visible = false;
                txtProcessDate.Visible = false;
                lblVchNo.Visible       = false;
                txtVchNo.Visible       = false;
            }
        }
Exemplo n.º 5
0
        protected void ShowMessage()
        {
            int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("Sp_DUMMYProcessDt", "A2ZACWMS"));

            if (result == 0)
            {
                var      dt             = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime processDate    = dt.ProcessDate;
                DateTime NewprocessDate = dt.DummyProcessDate;


                string date = NewprocessDate.ToString("dd/MM/yyyy");
                lblNewProcDate.Text = date;

                txtLastProcDt.Text = Converter.GetString(String.Format("{0:D}", processDate));
                txtNewProcDt.Text  = Converter.GetString(String.Format("{0:D}", NewprocessDate));

                txtStDay.Focus();
            }


            DivDetails.Visible = true;

            DivDetails.Style.Add("Top", "220px");
            DivDetails.Style.Add("Right", "640px");
            DivDetails.Style.Add("position", "fixed");
            DivDetails.Attributes.CssStyle.Add("opacity", "200");
            DivDetails.Attributes.CssStyle.Add("z-index", "200");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    hdnID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                    //lblModule.Text = Request.QueryString["a%b"];

                    string Voucher = (string)Session["VouNo"];
                    string module  = (string)Session["Module"];

                    txtVoucherNo.Text = Voucher;
                    lblModule.Text    = module;

                    DataTable dt = new DataTable();
                    dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery("SELECT  TrnDate FROM  dbo.A2ZTRANSACTION WHERE VchNo = '" + txtVoucherNo.Text + "' AND TrnCSGL=1", "A2ZCSMCUS");
                    if (dt.Rows.Count > 0)
                    {
                        A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                        DateTime          dte  = Converter.GetDateTime(dto.ProcessDate);
                        string            date = dte.ToString("dd/MM/yyyy");
                        txtTranDate.Text = date;
                    }
                    gvDetail();
                    SumValue();
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.Page_Load Problem');</script>");
                //throw ex;
            }
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    ddlAccountType();

                    BtnCalculate.Visible = false;
                    BtnPrint.Visible     = false;
                    lblVchNo.Visible     = false;
                    txtVchNo.Visible     = false;
                    BtnPost.Visible      = false;
                    BtnReverse.Visible   = false;
                    BtnExit.Visible      = true;
                    lblTotalAmt.Visible  = false;

                    hdnID.Text       = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                    hdnCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE));

                    A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                    DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                    string            date = dt.ToString("dd/MM/yyyy");
                    lblPdate.Text = date;
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.Page_Load Problem');</script>");
                //throw ex;
            }
        }
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));

                string PFlag = (string)Session["ProgFlag"];
                CtrlProgFlag.Text = PFlag;

                if (CtrlProgFlag.Text != "1")
                {
                    A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                    DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                    string            date = dt.ToString("dd/MM/yyyy");
                    CtrlProcDate.Text = date;
                    txtFromDate.Text  = date;
                    txtToDate.Text    = date;
                }
                else
                {
                    string RtxtFromDate = (string)Session["StxtFromDate"];
                    string RtxtToDate   = (string)Session["StxtToDate"];

                    txtFromDate.Text = RtxtFromDate;
                    txtToDate.Text   = RtxtToDate;
                }
            }
        }
Exemplo n.º 9
0
        private void InitializeValues()
        {
            A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
            DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
            string            date = dt.ToString("dd/MM/yyyy");

            lblProcessDate.Text = date;

            string RfDate        = (string)Session["fDate"];
            string RtDate        = (string)Session["tDate"];
            string RReportSelect = (string)Session["ReportSelect"];

            if (RfDate == null || RfDate == string.Empty)
            {
                txtFromDate.Text = Converter.GetString(dto.ProcessDate.ToString("dd/MM/yyyy"));
            }
            else
            {
                txtFromDate.Text = RfDate;
            }
            if (RtDate == null || RtDate == string.Empty)
            {
                txtToDate.Text = Converter.GetString(dto.ProcessDate.ToString("dd/MM/yyyy"));
            }
            else
            {
                txtToDate.Text = RtDate;
            }

            //if (RReportSelect != null && RReportSelect != string.Empty)
            //{
            //    ddlReports.SelectedValue = RReportSelect;
            //}
        }
Exemplo n.º 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblModule.Text = Request.QueryString["a%b"];

                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                txtLoanAppDate.Text = date;

                A2ZRECCTRLDTO getDTO = (A2ZRECCTRLDTO.ReadLastRecords(6));
                lblLastAppNo.Text = Converter.GetString(getDTO.CtrlRecLastNo);

                LoanPurposeDdl();
                Hideinfo();
                int lappno    = Converter.GetInteger(lblLastAppNo.Text);
                int LoanAppNo = lappno + 1;
                lblApplicationNo.Text = Converter.GetString(LoanAppNo);

                MemberDropdown();

                AccTypedropdown();
                txtLoanAppDate.Focus();
            }
        }
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtDescription.Text != string.Empty)
                {
                    gvDetail();
                    gvDetailInfo.Visible = false;

                    int totrec = gvDetailInfo.Rows.Count;

                    int lastWaseCode = (totrec + 1);

                    if (lastWaseCode < 10)
                    {
                        hdnSuppCode.Text = Converter.GetString("0" + lastWaseCode);
                    }

                    A2ZSUPPLIERDTO objDTO = new A2ZSUPPLIERDTO();

                    objDTO.SuppCode = Converter.GetInteger(hdnSuppCode.Text);

                    objDTO.SuppName = Converter.GetString(txtDescription.Text);

                    objDTO.SuppAddL1 = Converter.GetString(txtAddLine1.Text);

                    objDTO.SuppAddL2 = Converter.GetString(txtAddLine2.Text);

                    objDTO.SuppAddL3 = Converter.GetString(txtAddLine3.Text);

                    objDTO.SuppTel = Converter.GetString(txtSuppTelephone.Text);

                    objDTO.SuppMobile = Converter.GetString(txtSuppMobileNo.Text);

                    objDTO.SuppFax = Converter.GetString(txtSuppFax.Text);

                    objDTO.SuppEmail = Converter.GetString(txtSuppEmail.Text);

                    A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                    objDTO.SuppStatDate = Converter.GetDateTime(dto.ProcessDate.ToLongDateString());

                    int roweffect = A2ZSUPPLIERDTO.InsertInformation(objDTO);
                    if (roweffect > 0)
                    {
                        DivisionDropdown();
                        clearInfo();
                        BtnUpdate.Visible = false;
                        BtnSubmit.Visible = true;
                        gvDetail();
                        gvDetailInfo.Visible = false;
                        txtDescription.Text  = string.Empty;
                        txtDescription.Focus();
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text      = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                divPost.Visible = false;
                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                lblProcesDate.Text = date;
                txtDueDate.Text    = date;

                ddlCode.Enabled           = false;
                ddlKarat.Enabled          = false;
                ddlLocation.SelectedValue = "2";
                ddlLocation.Enabled       = false;

                CodeDropdown();
                PartyDropdown();
                CurrencyDropdown();

                ddlCurrency.SelectedIndex = 1;

                ConvertCurrencyDropdown();
                CalculateBalWeight();
                TruncateWF();
            }
        }
Exemplo n.º 13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));

                if (lblID.Text == string.Empty || lblID.Text == "0")
                {
                    Response.Redirect("A2ZLogin.aspx");
                }


                lblIDName.Text = "Login AS: " + DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));
                A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                lblProcessDate.Text = Converter.GetString(dto.ProcessDate.ToLongDateString());

                PurchasePartyDropdown();
                SalesPartyDropdown();


                lblPurchaseParty.Visible = false;
                DivPurchaseParty.Visible = false;
                lblSalesParty.Visible    = false;
                DivSalesParty.Visible    = false;

                ddlPurchasePartyName.Enabled = false;
                ddlSalesPartyName.Enabled    = false;
            }
        }
Exemplo n.º 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DivWeightView.Visible = false;

                lblID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));

                if (lblID.Text == string.Empty || lblID.Text == "0")
                {
                    Response.Redirect("A2ZLogin.aspx");
                }

                lblIDName.Text = "Login AS: " + DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));
                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                lblProcessDate.Text = date;

                SalePartyDropdown();
                TrackingPartyDropdown();
                //KaratDropdown();

                CalculateBalance();

                TruncateWF();
            }
        }
Exemplo n.º 15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                TextBox username = new TextBox();

                DivParty.Visible    = false;
                DivPurchase.Visible = false;
                DivTransit.Visible  = false;
                DivReceive.Visible  = false;
                DivSale.Visible     = false;
                DivReports.Visible  = false;

                lblCompanyName.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.COMPANY_NAME));


                lblID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));


                lblIDName.Text = "Login as : " + DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));

                A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                lblProcessDate.Text = Converter.GetString(dto.ProcessDate.ToLongDateString());
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdnPrmValue.Text = Request.QueryString["a%b"];
                string b = hdnPrmValue.Text;
                HdnModule.Text = b;


                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                CtrlTrnDate.Text = date;


                hdnID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                txtVoucherNo.Focus();
                btnDelete.Visible = false;
                btnCancel.Visible = false;

                ValidityFlag.Text = "0";

                DivExit.Visible = false;
            }
        }
Exemplo n.º 17
0
        protected void BtnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                lblDate.Text = Converter.GetString(dto.ProcessDate.ToShortDateString());
                if (gvDetails.Visible == true)
                {
                    for (int i = 0; i < gvDetails.Rows.Count; ++i)
                    {
                        TextBox STKItemCode    = (TextBox)gvDetails.Rows[i].Cells[0].FindControl("txtItemCode");
                        TextBox STKItemName    = (TextBox)gvDetails.Rows[i].Cells[1].FindControl("txtItemName");
                        TextBox STKUnitBalance = (TextBox)gvDetails.Rows[i].Cells[2].FindControl("txtBalance");
                        TextBox STKUnitAvgCost = (TextBox)gvDetails.Rows[i].Cells[3].FindControl("txtAvgCost");


                        string InsertExp = "INSERT INTO A2ZSTOPBALANCE (STKTrnDate,STKItemCode,STKItemName,STKItemGroupNo,STKItemCategoryNo,STKUnitQty,STKUnitAvgCost) VALUES ('" + lblDate.Text + "','" + STKItemCode.Text + "','" + STKItemName.Text + "','" + ddlGroup.SelectedValue + "','" + ddlCategory.SelectedValue + "','" + STKUnitBalance.Text + "','" + STKUnitAvgCost.Text + "')";
                        int    rowEffect = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(InsertExp, "A2ZSTMCUST2018"));

                        //string UpdateExp = "UPDATE A2ZSTMST SET STKUnitSalePrice = " + STSaleUnitPrice.Text + " WHERE STKItemCode = '" + STKItemCode.Text + "'";
                        //int rowEffect = Converter.GetInteger(DataAccessLayer.BLL.CommonManager.Instance.ExecuteNonQuery(UpdateExp, "A2ZSTMCUS"));
                    }
                    ScriptManager.RegisterStartupScript(this, typeof(string), "Error", "alert('Data Update Succesfully Done');", true);
                    gvDetail();
                    gvDetails.Visible = true;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text       = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                lblCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE));


                WarehouseDropdown();
                GroupDropdown();


                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");

                int Month = dt.Month;
                int Year  = dt.Year;

                ddlPeriodMM.SelectedValue   = Converter.GetString(Month);
                ddlPeriodYYYY.SelectedValue = Converter.GetString(Year);

                hdnToDaysDate.Text = Converter.GetString(String.Format("{0:Y}", dt));


                //txtfdate.Text = Converter.GetString(date);
                //txttdate.Text = Converter.GetString(date);

                A2ZSYSIDSDTO sysobj = A2ZSYSIDSDTO.GetUserInformation(Converter.GetInteger(lblID.Text), "A2ZHKMCUS");

                if (sysobj.IdsCWarehouseflag == false)
                {
                    lblCWarehouseflag.Text = "0";
                }
                else
                {
                    lblCWarehouseflag.Text = "1";
                }


                if (lblCWarehouseflag.Text == "0")
                {
                    ddlWarehouse.Enabled       = false;
                    txtWarehouse.Enabled       = false;
                    chkWarehouse.Visible       = false;
                    chkWarehouse.Checked       = false;
                    txtWarehouse.Text          = Converter.GetString(lblCashCode.Text);
                    ddlWarehouse.SelectedValue = Converter.GetString(lblCashCode.Text);
                }
                else
                {
                    ddlWarehouse.Enabled       = false;
                    txtWarehouse.Enabled       = false;
                    chkWarehouse.Visible       = true;
                    chkWarehouse.Checked       = true;
                    txtWarehouse.Text          = string.Empty;
                    ddlWarehouse.SelectedIndex = 0;
                }
            }
        }
Exemplo n.º 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text       = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                lblCashCode.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_GLCASHCODE));


                BtnAutoReverse.Visible = false;
                BtnAutoPost.Visible    = true;


                txtEmpNo.Focus();
                gvBenefitInfo.Visible   = false;
                gvDeductionInfo.Visible = false;

                A2ZCSPARAMETERDTO dto2  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt2   = Converter.GetDateTime(dto2.ProcessDate);
                string            date1 = dt2.ToString("dd/MM/yyyy");
                CtrlProcDate.Text = date1;


                //DivAllowance.Visible = false;
                //divDeduction.Visible = false;
            }
        }
Exemplo n.º 20
0
        protected void ddlItemName_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ddlItemName.SelectedIndex != 0)
            {
                A2ZCSPARAMETERDTO dto2  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt2   = Converter.GetDateTime(dto2.ProcessDate);
                string            date1 = dt2.ToString("dd/MM/yyyy");

                var prm = new object[4];
                prm[0] = ddlItemName.SelectedValue;
                prm[1] = Converter.GetDateToYYYYMMDD(date1);
                prm[2] = lblCashCode.Text;
                prm[3] = 0;

                int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("[SpM_STGenerateSingleItemBalance]", prm, "A2ZSTMCUS"));

                txtItemCode.Text = ddlItemName.SelectedValue;
                DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery("SELECT A2ZUNITCODE.UnitDesc, A2ZSTMST.STKUnit, A2ZSTMST.STKUnitQty FROM A2ZUNITCODE INNER JOIN A2ZSTMST ON A2ZUNITCODE.UnitNo = A2ZSTMST.STKUnit WHERE STKItemCode = " + ddlItemName.SelectedValue + " AND STKGroup = " + ddlGroup.SelectedValue + " AND STKSubGroup = " + ddlCategory.SelectedValue + "", "A2ZSTMCUS");

                if (dt.Rows.Count > 0)
                {
                    txtBalanceQty.Text = Converter.GetString(dt.Rows[0]["STKUnitQty"]);
                    lblBalUnit.Text    = Converter.GetString(dt.Rows[0]["UnitDesc"]);
                    lblBalUnit2.Text   = Converter.GetString(dt.Rows[0]["UnitDesc"]);
                }
            }
            else
            {
                txtItemCode.Text = string.Empty;
                txtItemCode.Focus();
            }
        }
Exemplo n.º 21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DivMessage.Visible = false;
            try
            {
                if (IsPostBack)
                {
                }
                else
                {
                    //ddlModule = A2ZERPMODULEDTO.GetDropDownList(ddlModule);

                    IdsDropdown();
                    txtIdsNo.Focus();


                    btnMark1.Visible   = false;
                    btnUnMark1.Visible = false;


                    A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();


                    //lblMemApp1.Text = Converter.GetString(dto.PrmMemApplication1);
                    //lblMemApp2.Text = Converter.GetString(dto.PrmMemApplication2);
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Err.Load Problem');</script>");
                //throw ex;
            }
        }
Exemplo n.º 22
0
        protected void BtnSearch_Click(object sender, EventArgs e)
        {
            A2ZCSPARAMETERDTO dto2  = A2ZCSPARAMETERDTO.GetParameterValue();
            DateTime          dt2   = Converter.GetDateTime(dto2.ProcessDate);
            string            date1 = dt2.ToString("dd/MM/yyyy");

            var prm = new object[3];

            prm[0] = Converter.GetDateToYYYYMMDD(date1);


            prm[1] = "0";


            prm[2] = 0;

            int result = Converter.GetInteger(CommonManager.Instance.GetScalarValueBySp("[SpM_STGenerateAllItemBalance]", prm, "A2ZSTMCUS"));



            if (ddlGroup.SelectedIndex != 0)
            {
                gvDetail();
                gvDetails.Visible = true;
            }
        }
Exemplo n.º 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                lblID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));

                A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                string            date = dt.ToString("dd/MM/yyyy");
                CtrlProcDate.Text = date;


                AccTypeDropdown();
                CurrencyDropdown();


                lblChequeNo.Visible    = false;
                txtChequeNo.Visible    = false;
                lblAccountName.Visible = false;
                ddlAccountName.Visible = false;

                ddlAccNo.Visible = false;

                DivReInput.Visible = false;
            }
        }
Exemplo n.º 24
0
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {

                lblID.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));

                if (lblID.Text == string.Empty || lblID.Text == "0")
                {
                    Response.Redirect("A2ZLogin.aspx");
                }

                lblIDName.Text = "Login AS: " + DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));
                A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime dt = Converter.GetDateTime(dto.ProcessDate);
                string date = dt.ToString("dd/MM/yyyy");
                lblProcessDate.Text = date;

                LocationDropdown();
                PartyDropdown();

                ddlLocation.SelectedIndex = 1;
            }

        }
Exemplo n.º 25
0
        protected void ddllType_SelectedIndexChanged(object sender, EventArgs e)
        {
            DataTable dt = DataAccessLayer.BLL.CommonManager.Instance.GetDataTableByQuery("SELECT * FROM A2ZEMPLEAVETYPE WHERE  EmpleaveCode = '" + ddllType.SelectedValue + "'", "A2ZHRMCUS");

            if (dt.Rows.Count > 0)
            {
                lblEffectSalary.Text = Converter.GetString(dt.Rows[0]["EffectSalary"]);
                txtTotDay.Text       = Converter.GetString(dt.Rows[0]["TotalDays"]);
            }

            A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
            DateTime          date = Converter.GetDateTime(dto.ProcessDate);
            int year = date.Year;

            lblprocYear.Text = Converter.GetString(year);
            int empcode = Converter.GetInteger(txtEmpNo.Text);
            int lyear   = Converter.GetInteger(year);
            int lcode   = Converter.GetInteger(ddllType.SelectedValue);

            A2ZEMPLEAVEBALANCEDTO getDTO = (A2ZEMPLEAVEBALANCEDTO.GetInformation(empcode, lyear, lcode));

            if (getDTO.norecord > 0)
            {
                txtBalDay.Text   = Converter.GetString(getDTO.LeaveBalDays);
                lblUsedDays.Text = Converter.GetString(getDTO.LeaveDays);
            }
            else
            {
                txtBalDay.Text   = string.Empty;
                lblUsedDays.Text = string.Empty;
            }
        }
Exemplo n.º 26
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    lblID.Text     = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_ID));
                    lblIDName.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));

                    A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                    DateTime          dt1  = Converter.GetDateTime(dto.ProcessDate);
                    string            date = dt1.ToString("dd/MM/yyyy");
                    lblProcDate.Text = Converter.GetString(date);

                    LoadReceiveGridSpooler();

                    FactoryPartyDropdown();

                    dvJpgTable.Visible = false;
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.Page_Load Problem');</script>");
            }
        }
Exemplo n.º 27
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    string NewAccNo = (string)Session["NewAccNo"];
                    string flag     = (string)Session["flag"];
                    lblflag.Text = flag;

                    string Module = (string)Session["SModule"];

                    if (lblflag.Text == string.Empty)
                    {
                        lblModule.Text = Request.QueryString["a%b"];
                        txtAccNo.Focus();
                    }
                    else
                    {
                        lblModule.Text = Module;
                    }


                    AccStatusDropdown();

                    A2ZCSPARAMETERDTO dto  = A2ZCSPARAMETERDTO.GetParameterValue();
                    DateTime          dt   = Converter.GetDateTime(dto.ProcessDate);
                    string            date = dt.ToString("dd/MM/yyyy");
                    txtAccStatDate.Text = date;

                    lblLienAmt.Visible = false;
                    txtLienAmt.Visible = false;
                    txtLienAmt.Text    = "0";

                    lblBalLien.Visible       = false;
                    lblBalLienAmount.Visible = false;

                    if (lblflag.Text == "1" && NewAccNo != "")
                    {
                        txtAccNo.Text = NewAccNo;
                        GetAccInfo();
                    }

                    if (lblModule.Text == "04")
                    {
                        lblMemNo.Text = "Staff Code";

                        lblCUNum.Visible     = false;
                        txtCreditUNo.Visible = false;
                        lblCuName.Visible    = false;
                    }
                }
            }
            catch (Exception ex)
            {
                Page.ClientScript.RegisterStartupScript(this.GetType(), "scriptkey", "<script>alert('System Error.Page_Load Problem');</script>");
                //throw ex;
            }
        }
Exemplo n.º 28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    lblUserName.Text = DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));

                    var p = A2ZERPSYSPRMDTO.GetParameterValue();
                    lblCompanyName.Text = p.PrmUnitName;


                    //    GetMenuData();

                    //A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                    //lblProcessDate.Text = Converter.GetString(dto.ProcessDate.ToLongDateString());


                    string Rdate = (string)Session["date"];

                    if (Rdate == null || Rdate == "")
                    {
                        A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                        lblProcessDate.Text = Converter.GetString(dto.ProcessDate.ToLongDateString());
                    }
                    else
                    {
                        lblProcessDate.Text = Rdate;
                    }



                    //if (DataAccessLayer.Utility.Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_PERMISSION)) == 10)
                    //{
                    //    lblUserPermission.Text = "Permission :" + "Input";
                    //}
                    //if (DataAccessLayer.Utility.Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_PERMISSION)) == 20)
                    //{
                    //    lblUserPermission.Text = "Permission :" + "Checked and Verify";
                    //}
                    //if (DataAccessLayer.Utility.Converter.GetSmallInteger(SessionStore.GetValue(Params.SYS_USER_PERMISSION)) == 30)
                    //{
                    //    lblUserPermission.Text = "Permission :" + "Approved";
                    //}
                }
                else
                {
                    //Response.Cache.SetNoStore();
                    //Response.Cache.AppendCacheExtension("no-cache");
                    //Response.Expires = 0;

                   
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Exemplo n.º 29
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         lblIDName.Text = "Login AS: " + DataAccessLayer.Utility.Converter.GetString(SessionStore.GetValue(Params.SYS_USER_NAME));
         A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
         lblProcessDate.Text = Converter.GetString(dto.ProcessDate.ToLongDateString());
     }
 }
Exemplo n.º 30
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string Flag = (string)Session["Flag"];
                CtrlFlag.Text = Flag;

                ddlAccountType();

                A2ZCSPARAMETERDTO dto = A2ZCSPARAMETERDTO.GetParameterValue();
                DateTime          dt  = Converter.GetDateTime(dto.ProcessDate);
                hdnPeriod.Text = Converter.GetString(dt);

                int Month = dt.Month;
                int Year  = dt.Year;

                hdnMonth.Text = Converter.GetString(Month);
                hdnYear.Text  = Converter.GetString(Year);

                if (CtrlFlag.Text == "1")
                {
                    string A = (string)Session["RPeriodMM"];
                    string B = (string)Session["RPeriodYYYY"];
                    string C = (string)Session["RAccType"];
                    string D = (string)Session["RMthFrom"];
                    string E = (string)Session["RMthTill"];

                    string F = (string)Session["TrnDate"];


                    ddlPeriodMM.SelectedValue   = A;
                    ddlPeriodYYYY.SelectedValue = B;
                    ddlAccType.SelectedValue    = C;
                    txtDueMthFrom.Text          = D;
                    if (txtDueMthFrom.Text == "-")
                    {
                        txtDueMthFrom.Text = "0";
                    }
                    txtDueMthTill.Text = E;
                    if (txtDueMthTill.Text == "-")
                    {
                        txtDueMthTill.Text = "0";
                    }

                    hdnDate.Text = F;

                    //RemoveSession();
                    gvPensionDefaulter.Visible = true;
                    gvPreview();
                    //BtnView_Click(this, EventArgs.Empty);
                }

                ddlPeriodMM.SelectedValue   = Converter.GetString(Month);
                ddlPeriodYYYY.SelectedValue = Converter.GetString(Year);
            }
        }