Пример #1
0
 protected void DropPart_SelectedIndexChanged(object sender, EventArgs e)
 {
     lock (thisLock)
     {
         try
         {
             DBServer db = new DBServer();
             DataSet  ds = new DataSet();
             db.PartNo = DropPart.SelectedItem.Text;
             ds        = db.ViewDescriptionbyPartNO(db);
             if (ds.Tables[0].Rows.Count > 0)
             {
                 TxtDescription.Text = ds.Tables[0].Rows[0].ItemArray[0].ToString();
                 if (DropPart.SelectedItem.Text != "-Select-" && DropType.SelectedItem.Text != "-Select-" && DropProcess.SelectedItem.Text != "-Select-")
                 {
                     get_gridresult();
                 }
                 else
                 {
                     div_user.Visible       = false;
                     DropType.SelectedValue = "0";
                     BindProcess();
                 }
             }
         }
         catch (Exception ex)
         {
             ExceptionLogging.SendExcepToDB(ex);
         }
     }
 }
Пример #2
0
    public void loadpagedata()
    {
        div_DropPart.Attributes.Add("Disabled", "");
        DropPart.SelectedValue = Session["PartNo"].ToString();
        DropPart.Enabled       = false;
        string oper = "";

        lock (thisLock)
        {
            try
            {
                if (Session["Operation"].ToString() == "1" || Session["Operation"].ToString() == "2")
                {
                    if (Session["Operation"].ToString() == "1")
                    {
                        oper = "OP1";
                    }
                    if (Session["Operation"].ToString() == "2")
                    {
                        oper = "OP2";
                    }
                }
                else
                {
                    oper = Session["Operation"].ToString();
                }
                DropProcess.SelectedItem.Text = oper;
                hdn_process.Value             = oper;
                DropProcess.Enabled           = false;

                DBServer db = new DBServer();
                DataSet  ds = new DataSet();
                db.PartNo = Session["PartNo"].ToString();
                ds        = db.ViewDescriptionbyPartNO(db);
                if (ds.Tables[0].Rows.Count > 0)
                {
                    TxtDescription.Text    = ds.Tables[0].Rows[0].ItemArray[0].ToString();
                    TxtDescription.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                ExceptionLogging.SendExcepToDB(ex);
            }
        }
    }