コード例 #1
0
 public void Bind_DDL_Zone()
 {
     DDLZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()), "Zone");
     DDLZone.DataBind();
     DDLZone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
     ddlCustmore.Items.Insert(0, new ListItem("-Select Customer-", "0"));
 }
コード例 #2
0
 public void Bind_DDL_ZoneCust()
 {
     DDLZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(0, "Zone");
     DDLZone.DataBind();
     DDLZone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
     ddlCustmore.Items.Insert(0, new ListItem("-Select Customer-", "0"));
 }
コード例 #3
0
 protected void DDLWarehouse_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (DDLGodown.SelectedIndex > 0)
         {
             SqlParameter[] arrParam = new SqlParameter[2];
             arrParam[0] = new SqlParameter("@Action", "SELECT_ByGodownID");
             arrParam[1] = new SqlParameter("@GodownID", DDLGodown.SelectedValue);
             DSRecords   = SqlHelper.ExecuteDataset(Connection.connect(), CommandType.StoredProcedure, "SP_Bin_ZoneMaster_CRUD", arrParam);
             DTRecords   = DSRecords.Tables[0];
             if (DTRecords.Rows.Count > 0)
             {
                 DDLZone.DataSource     = DTRecords;
                 DDLZone.DataTextField  = "ZoneTitle";
                 DDLZone.DataValueField = "ID";
                 DDLZone.DataBind();
                 DDLZone.Items.Insert(0, new ListItem("SELECT", "0"));
             }
         }
         else
         {
             ShowMessage("Select Warehouse First!", MessageType.Error);
         }
         GenerateBinLocation();
     }
     catch (Exception ex)
     {
         ShowMessage(ex.Message, MessageType.Error);
     }
 }
コード例 #4
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex != 0)
     {
         Bind_DDL_Zone();
         DDLZone.Focus();
     }
 }
コード例 #5
0
 public void Bind_DDL_Zone()
 {
     DDLZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(ddlsuperzoneid.SelectedValue.ToString()), "Zone");
     DDLZone.DataBind();
     DDLZone.Items.Insert(0, new ListItem("-Select Zone-", "0"));
     DDLZone.Focus();
     DDLZone.TabIndex = 2;
 }
コード例 #6
0
    protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (DDLZone.SelectedIndex == 0)
        {
            DDLZone.Focus();

            Bind_DDL_ZoneCust();
        }
    }
コード例 #7
0
 protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLZone.SelectedIndex == 0)
     {
         MessageBox("Select SuperZone");
         DDLZone.Focus();
         // SalesanalysisReportview.ReportSource = null;
         //  DDLZone.SelectedValue = null;
     }
 }
コード例 #8
0
    protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (DDLZone.SelectedIndex == 0)
        {
            // MessageBox("Select SuperZone");

            DDLZone.Focus();

            //  DDLZone.SelectedValue = null;
        }
    }
コード例 #9
0
 public void Bind_DDL_Zone()
 {
     DDLZone.Items.Clear();
     if (DDLSuperZone.SelectedIndex != 0)
     {
         DDLZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()), "Zone");
         DDLZone.DataBind();
         DDLZone.Items.Insert(0, new ListItem("-All Zone-", "0"));
         DDLZone.Focus();
     }
 }
コード例 #10
0
    public void SaveAreaZoneMaster()
    {
        if (DDLSuperZone.SelectedIndex == 0)
        {
            MessageBox("Select SuperZone");
            DDLSuperZone.Focus();
        }
        if (DDLZone.SelectedIndex == 0)
        {
            MessageBox("Select Zone");
            DDLZone.Focus();
        }
        else
        {
            AreaZoneMaster _ObjAreaZoneMaster = new AreaZoneMaster();
            _ObjAreaZoneMaster.AreaZoneID   = Convert.ToInt32(lblID.Text);
            _ObjAreaZoneMaster.AreaZoneCode = txtAreaZoneCode.Text.Trim();
            _ObjAreaZoneMaster.AreaZoneName = txtAreaZoneName.Text.Trim();
            _ObjAreaZoneMaster.ZoneID       = Convert.ToInt32(DDLZone.SelectedItem.Value.ToString());
            _ObjAreaZoneMaster.IsActive     = Chekacv.Checked;

            try
            {
                _ObjAreaZoneMaster.Save();
                MessageBox("Record saved successfully");
                grdAreaZoneDetails.DataSource = BindAreaZoneDetail();
                grdAreaZoneDetails.DataBind();
                if (btnSave.Text == "Update")
                {
                    pnlAreaZoneDetails.Visible = true;
                    PnlAreaZone.Visible        = false;
                    btnSave.Visible            = false;
                    btnSave.Text            = "Save";
                    txtAreaZoneCode.Enabled = true;
                    filter.Visible          = true;
                }
                else
                {
                    PnlAreaZone.Visible        = true;
                    pnlAreaZoneDetails.Visible = false;
                    txtAreaZoneCode.Text       = "";
                    txtAreaZoneName.Text       = "";
                    DDLSuperZone.SelectedValue = null;
                    DDLZone.Items.Clear();
                    //DDLZone.SelectedValue = null;
                    Bind_DDL_SuperZone();
                }
            }
            catch
            {
            }
        }
    }
コード例 #11
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         DDLZone.Items.Clear();
     }
     else
     {
         Bind_DDL_Zone();
         DDLZone.Focus();
     }
 }
コード例 #12
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         DDLZone.Items.Clear();
         DDLZone.Items.Insert(0, new ListItem("--All--", "0"));
     }
     else
     {
         Bind_DDL_Zone();
         DDLZone.Focus();
     }
 }
コード例 #13
0
 protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLZone.SelectedIndex == 0)
     {
         DDLZone.Focus();
         ddlCustmore.Items.Clear();
         ddlCustmore.Items.Insert(0, new ListItem("-All Customer-", "0"));
     }
     else
     {
         Bind_DDL_Customer();
         ddlCustmore.Focus();
     }
 }
コード例 #14
0
 protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLZone.SelectedIndex == 0)
     {
         DDLZone.Focus();
         ddlCustmore.Items.Clear();
         Bind_DDL_ZoneCust();
     }
     else
     {
         Bind_DDL_Customer();
         ddlCustmore.Focus();
     }
 }
コード例 #15
0
 protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLZone.SelectedIndex == 0)
     {
         DDLZone.Focus();
         Bind_DDL_Zone();
         //   Bind_DDL_SuperZone();
     }
     else
     {
         Bind_DDL_AreaZone();
         DDLAreaZone.Focus();
     }
 }
コード例 #16
0
 protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLZone.SelectedIndex == 0)
     {
         // MessageBox("Select SuperZone");
         DDLZone.Focus();
         DDLCustomer.Items.Clear();
         //  DDLZone.SelectedValue = null;
     }
     else
     {
         BindCustomer();
         DDLCustomer.Focus();
     }
 }
コード例 #17
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         DDLZone.Items.Clear();
         Bind_DDL_SuperZone();
     }
     else
     {
         Bind_DDL_Zone();
         //rdbAll.Checked = false;
         //rdbAmount.Checked = false;
         DDLZone.Focus();
     }
 }
コード例 #18
0
 protected void DDLZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLZone.SelectedIndex == 0)
     {
         // MessageBox("Select SuperZone");
         //lblzselect.Visible = false;
         DDLZone.Focus();
         lblsdzselect.Text = "Selected : " + ddlSDZone.SelectedItem.Text.ToString() + " : " + DDLSuperZone.SelectedItem.Text.ToString();
         //  DDLZone.SelectedValue = null;
     }
     else
     {
         // lblzselect.Visible = true;
         lblsdzselect.Text = "Selected : " + ddlSDZone.SelectedItem.Text.ToString() + " : " + DDLSuperZone.SelectedItem.Text.ToString() + " : " + DDLZone.SelectedItem.Text.ToString();
         txtaddname.Focus();
     }
 }
コード例 #19
0
 protected void DDLSuperZone_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (DDLSuperZone.SelectedIndex == 0)
     {
         DDLSuperZone.Focus();
         //lblszselect.Visible = false;
         DDLZone.Items.Clear();
         DDLZone.Items.Insert(0, new ListItem("--Select Zone--", "0"));
         lblsdzselect.Text = "Selected : " + ddlSDZone.SelectedItem.Text.ToString();
     }
     else
     {
         Bind_DDL_Zone();
         //lblszselect.Visible = true;
         lblsdzselect.Text = "Selected : " + ddlSDZone.SelectedItem.Text.ToString() + " : " + DDLSuperZone.SelectedItem.Text.ToString();
         DDLZone.Focus();
     }
 }
コード例 #20
0
 public void Bind_DDL_Zone()
 {
     DDLZone.Items.Clear();
     ddlCustmore.Items.Clear();
     if (DDLSuperZone.SelectedIndex > 0)
     {
         DDLZone.DataSource = Masters.Get_AreaZone_Zone_SuperZone(Convert.ToInt32(DDLSuperZone.SelectedValue.ToString()), "Zone");
         DDLZone.DataBind();
         DDLZone.Focus();
         DDLZone.Items.Insert(0, new ListItem("-All Zone-", "0"));
         ddlCustmore.Items.Insert(0, new ListItem("-All Customer-", "0"));
     }
     else
     {
         DDLZone.Items.Insert(0, new ListItem("-<Select SuperZone-", "0"));
         ddlCustmore.Items.Insert(0, new ListItem("-<Select SuperZone-", "0"));
     }
     customerDisabled();
 }
コード例 #21
0
    protected void BtnGetDCDetails_Click(object sender, EventArgs e)
    {
        String cd = "";

        ModalPopUpDocNum.Hide();
        Session["tempDCData"] = null;

        int DocNum = Convert.ToInt32(ddldocno.SelectedValue);


        //  bool condition = false;
        cd = "1";
        DataSet   ds     = DCMaster.Get_DCMasterBy_DocNum(DocNum, "1");
        DataTable dt     = ds.Tables[0];
        DataTable dtzone = ds.Tables[2];

        cd = "2";
        if (dt.Rows.Count > 0)
        {
            txtdocnew.Text   = dt.Rows[0]["DocumentNo_New"].ToString();
            txtdoc.Text      = dt.Rows[0]["DocumentNo"].ToString();
            txtchalan.Text   = dt.Rows[0]["ChallanNo"].ToString();
            txtChalDate.Text = dt.Rows[0]["ChallanDate"].ToString();
            txtorder.Text    = dt.Rows[0]["OrderNo"].ToString();
            txtcustomer.Text = dt.Rows[0]["CustCode"].ToString();
            lblCustName.Text = dt.Rows[0]["CustName"].ToString();
            DDlemployee.Items.Clear();
            cd = "3";
            try
            {
                DDlemployee.DataSource = DCMaster.Get_Employee_By_Customer_Code(txtcustomer.Text.ToString(), "Employee");
                DDlemployee.DataBind();
                cd = "4";
                if (DDlemployee.Items.Count > 0)
                {
                    DDlemployee.SelectedValue = dt.Rows[0]["SalesmanCode"].ToString();
                    cd = "5";
                    DDlemployee.SelectedItem.Text = dt.Rows[0]["SalesmanName"].ToString();
                    cd = "6";
                }
                txtOrdDate.Text    = dt.Rows[0]["OrderDate"].ToString();
                txtdocDate.Text    = dt.Rows[0]["DocumentDate"].ToString();
                txtpIncharge.Text  = dt.Rows[0]["PIncharge"].ToString();
                txtspInstruct.Text = dt.Rows[0]["SpInstruction"].ToString();
                txtbankdet.Text    = dt.Rows[0]["BankCode"].ToString();
                lblbankname.Text   = dt.Rows[0]["BankName"].ToString();
                cd = "7";
                //Extra Zone Code Bind
                if (dtzone.Rows.Count > 0)
                {
                    lblZoneCode.Visible = true;
                    DDLZone.Visible     = true;
                    DDLZone.Items.Clear();
                    DDLZone.DataSource = ds.Tables[2];
                    DDLZone.DataBind();
                    if (dt.Rows[0]["ExtraZoneCode"].ToString() != "")
                    {
                        //DDLZone.SelectedValue = dt.Rows[0]["ExtraZoneCode"].ToString();
                    }
                }
                else
                {
                    DDLZone.Items.Clear();
                    lblZoneCode.Visible = false;
                    DDLZone.Visible     = false;
                }


                txtDeliverydte.Text = Convert.ToDateTime(DCMaster.Get_DCMasterBy_DocNum(DocNum, "0").Tables[1].Rows[0]["DeliveryDate"].ToString()).ToString("dd/MM/yyyy");
                UpdatePanel14.Update();
            }
            catch (Exception ex)
            {
                MessageBox(cd);
                //Response.Write(ex.Message.ToString());
            }

            // Bind_DDL_Transport();
            //  Ddltransport.SelectedValue = dt.Rows[0]["TransportID"].ToString();
            if (dt.Rows[0]["TransporterCode"].ToString() == "Trans")
            {
                lbltransporter.Visible = false;
                lbltransporter.Text    = dt.Rows[0]["TransporterCode"].ToString();

                txttransporter.Text = dt.Rows[0]["Transporter"].ToString();
            }
            else
            {
                txttransporter.Text    = dt.Rows[0]["TransporterCode"].ToString();
                lbltransporter.Visible = true;
                lbltransporter.Text    = dt.Rows[0]["Transporter"].ToString();
            }
            //DataSet ds = new DataSet();
            // ds = SpecimanDetails.GetSpecimenDatilsByEmpCode(Convert.ToString(DocNum), "documentno");

            DataTable dt1 = new DataTable();
            if (Session["tempDCData"] != null)
            {
                Session["tempDCData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempDCData"];
            }
            else
            {
                Session["tempDCData"] = fillTempBookData(DocNum.ToString(), "get");
                dt1 = (DataTable)Session["tempDCData"];
            }

            grdBookDetails.DataSource = dt1;
            grdBookDetails.DataBind();
            grdBookDetails.Columns[5].Visible = true;
            grdBookDetails.Columns[4].Visible = true;
            btn_Save.Visible = true;
            //DataTable dt3 = new DataTable();
            //dt3 = ds.Tables[0];
            //Session["tempDCData"] = dt3;
            grdBookDetails.Visible = true;
            //  btn_Save.Visible = false;
        }
        else
        {
            message("Record not found for document no. " + TxtDocNo.Text);
            ModalPopUpDocNum.Show();
            TxtDocNo.Text = "";
            TxtDocNo.Focus();
            btn_Save.Visible = false;
        }
    }