Exemple #1
0
        public void fetchInward(int scrollNo)
        {
            Inward obj = new Process().GetInwardEntry(scrollNo);
            if (obj != null)
            {
                txtTransactionDt.Text = Convert.ToDateTime(obj.ie_execdt).ToString(dateFormat);
                txtExecutionDt.Text = Convert.ToDateTime(obj.ie_dt).ToString(dateFormat);
                new Process().FillInstrumentDropDown(cmbInstructionType);
                cmbInstructionType.SelectedValue = obj.ie_instno;
                txtlotno.Text = obj.ie_lotno.ToString();
                txtslipno.Text = obj.ie_slipno;
                GetCompanyName();

                //txtcharges.Text = obj.ie_charge.ToString();
                //txtremarks.Text = obj.ie_remark;
                cmbReceiptMode.SelectedValue = obj.ie_mode;
                new Process().FillReasonfortradeDropDown(cmbReason);
                //RevertFields(false);
                txtInternalRefNo.Enabled = false;
            }
            else
            {
                showError("Invalid Scroll No");
                ManageButtons("Load");
            }
        }
 public void fetchInward(int scrollNo)
 {
     Inward obj = new Process().GetInwardEntry(scrollNo);
     if (obj != null)
     {
         txtexecdt.Text = Convert.ToDateTime(obj.ie_execdt).ToString(dateFormat);
         txtDt.Text = Convert.ToDateTime(obj.ie_dt).ToString(dateFormat);
         new Process().FillInstrumentDropDown(ddlstInstmnt);
         ddlstInstmnt.SelectedValue = obj.ie_instno;
         new Process().FillLotNoDropDown(ddllotNo, Convert.ToInt32(ddlstInstmnt.SelectedValue));
         ddllotNo.SelectedValue = obj.ie_lotno.ToString();
         GetLotSize();
         txtSrNo.Text = obj.ie_slipno;
         GetCompanyName();
         txtinst.Text = obj.ie_nooftrx.ToString();
         txtcharges.Text = obj.ie_charge.ToString();
         txtremarks.Text = obj.ie_remark;
         ddl_mode_delivery.SelectedValue = obj.ie_mode;
         RevertFields(false);
         txtScroll.Enabled = false;
     }
     else
     {
         showError("Invalid Scroll No");
         ManageButtons("Load");
     }
 }
Exemple #3
0
        public void SaveData()
        {
            objs = (List<InterDepository>)Session["obj"];
            int _result = new Process().AddInterDP(objs);
            if (_result > 0)
            {
                Session["obj"] = null;
                ClearFields1("");
                ClearFields2("");
                ManageFields1(false);
                ManageFields2(false);
                ManageButtons("Load");
                GrdOnMarket.DataSource = null;
                GrdOnMarket.DataBind();
                showError("Record added successfully!");

            }
            else
            {
                showError("Some error occured. Please try again");
            }
        }
Exemple #4
0
 public void getFillDetailsOnSearch(int int_pri_key)
 {
     InterDepository obj = new Process().GETInterDP(int_pri_key);
     if (obj != null)
         fillformWithObj(obj);
     txtdpid.Text = "1231321";
 }
Exemple #5
0
        public void GetCompanyName()
        {
            Classes.Validate _validate = new Classes.Validate();
            int slipNo = 0;
            int instrNo = 0;
            bool isAllOk = true;

            if (_validate.isNotSelected(cmbInstructionType))
            {
                isAllOk = false;
                showError("Select Instrument");
            }
            else
            {
                instrNo = _validate.convertNumber(cmbInstructionType.SelectedValue);
            }

            if (_validate.isNotNumber(txtslipno))
            {
                isAllOk = false;
                showError("Enter Valid Slip Number");
            }
            else
            {
                slipNo = _validate.convertNumber(txtslipno.Text);
            }

            if (isAllOk)
            {

                ChequeMaster obj = new Process().GetCheque(slipNo, instrNo);
                if (obj != null)
                {
                    txtClientId.Text = obj.companyCode;
                    txtClientName.Text = obj.companyName;
                    txtjntholder1.Text = obj.secondName;
                    txtlblJH2.Text = obj.thirdName;
                }
                else
                {
                    txtClientName.Text = "";
                    txtClientName.Text = "";
                    showError("Invalid Slip Number / Instruction ");
                }
            }
        }
        public void GetCompanyName()
        {
            Validate _validate = new Validate();
            int slipNo = 0;
            int instrNo = 0;
            bool isAllOk = true;

            if (_validate.isNotSelected(ddlstInstmnt))
            {
                isAllOk = false;
                showError("Select Instrument");
            }
            else
            {
                instrNo = _validate.convertNumber(ddlstInstmnt.Text);
            }

            if (_validate.isNotNumber(txtSrNo))
            {
                isAllOk = false;
                showError("Enter Valid Slip Number");
            }
            else
            {
                slipNo = _validate.convertNumber(txtSrNo.Text);
            }

            if (isAllOk)
            {
                ChequeMaster obj = new Process().GetCheque(slipNo, instrNo);

                if (obj == null)
                {
                    txtClid1.Text = "";
                    txtClid2.Text = "";
                    txtSrNo.Text = "";
                    showError("Invalid Slip Number / Instruction ");
                }
                else
                {
                    txtClid1.Text = obj.companyCode;
                    txtClid2.Text = obj.companyName;
                }
            }
        }
 protected void txtSlip_TextChanged(object sender, EventArgs e)
 {
     Validate _validate = new Validate();
     if (_validate.isNotNumber(txtSrNo.Text))
         showError("Invalid Slip No");
     else {
         int count = new Process().CheckInwardExists(Convert.ToInt32(txtSrNo.Text));
         if (count > 0)
         {
             txtClid1.Text = "";
             txtClid2.Text = "";
             txtSrNo.Text = "";
             showError("Entry is already done for entered slip ");
         }
         else
         {
             GetCompanyName();
         }
     }
 }
        protected void Btnupdate_Click(object sender, EventArgs e)
        {
            ManageButtons("Update");
            Inward obj = getInwardDetails();
            if (obj != null)
            {
                obj.ie_scrollno = GetScrollNo();
                int result = new Process().UpdateInwardEntry(obj);
                if (result > 0)
                {
                    ClearFields();
                    RevertFields(false);
                    InstructionGrid1.LoadGrid();
                    showError("Record updated successfully.");
                }

                else
                    showError("Error occured. Please try again.");
            }
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Session["UserId"].ToString()))
            {
                Inward obj = getInwardDetails();
                if (obj != null)
                {
                    int _result = new Process().AddInwardEntry(obj);
                    if (_result > 0)
                    {
                        InstructionGrid1.LoadGrid();
                        ClearFields();
                        RevertFields(false);
                        showError("Inward added successfully");
                        ManageButtons("Load");
                    }
                    else
                        showError("Some error occured! Please try again.");
                }

            }
            else
            {

            }
        }
        public void GetLotSize()
        {
            Validate _validate = new Validate();
            int lotNo = 0;
            int instrNo = 0;
            bool isAllOk = true;
            if (_validate.isNotSelected(ddlstInstmnt))
            {
                isAllOk = false;
                showError("Select Instrument");
            }
            else
            {
                instrNo = _validate.convertNumber(ddlstInstmnt.SelectedValue);
            }

            if (_validate.isNotSelected(ddllotNo))
            {
                isAllOk = false;
                showError("Select Lot");
            }
            else
            {
                lotNo = _validate.convertNumber(ddllotNo.SelectedValue);
            }

            if (isAllOk)
            {
                LotSize obj = new Process().GetLotSize(lotNo, instrNo);
                if (obj != null)
                {
                    txtlotsize.Text = obj.lz_size.ToString();
                }
                else
                {
                    txtlotsize.Text = "";
                    showError("Invalid Lot / Instruction ");
                }
            }
        }