Ejemplo n.º 1
0
        /// <summary>
        /// The purpose of this adddress to get the installer details for passing installer unique code.
        /// </summary>
        /// <param name="uniquecode"></param>
        /// <returns></returns>
        public static VW_InstallerDetail GetInstaller(string uniquecode)
        {
            VW_InstallerDetail installer = null;

            try
            {
                using (LinqToSqlDataContext db = new LinqToSqlDataContext())
                {
                    installer = (from installers in db.VW_InstallerDetails
                                 where installers.UniqueCode == Convert.ToInt32(uniquecode)
                                 select installers).FirstOrDefault();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(installer);
        }
Ejemplo n.º 2
0
 protected void gvDevicelist_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         int selectedRow = gvDevicelist.SelectedIndex;
         if (gvDevicelist.Rows.Count > 0)
         {
             chip.Text         = Server.HtmlDecode(gvDevicelist.Rows[selectedRow].Cells[1].Text).Trim();
             nua_data.Text     = Server.HtmlDecode(gvDevicelist.Rows[selectedRow].Cells[2].Text).Trim();
             esn_sim.Text      = Server.HtmlDecode(gvDevicelist.Rows[selectedRow].Cells[3].Text).Trim();
             SelectedEMNo.Text = Server.HtmlDecode(gvDevicelist.Rows[selectedRow].Cells[4].Text).Trim();
             int Dev_Inst_UnqCode = Convert.ToInt32(gvDevicelist.DataKeys[selectedRow].Values["Dev_Inst_UnqCode"].ToString());
             if (Dev_Inst_UnqCode != 0)
             {
                 VW_InstallerDetail installer = CSLOrderingARCBAL.BAL.InstallerBAL.GetInstaller(Dev_Inst_UnqCode.ToString());
                 if (installer != null)
                 {
                     TextBox txtInstaller;
                     if (enablePostCodeSearch)
                     {
                         txtInstaller = (TextBox)Installers.FindControl("installerCompanyName");
                     }
                     else
                     {
                         txtInstaller = (TextBox)Installers.FindControl("installerCompanyName");
                         Button btnSearch = (Button)Installers.FindControl("btnSearch");
                     }
                     txtInstaller.Text = installer.CompanyName;
                 }
             }
             LockSelection();
         }
     }
     catch (Exception objException)
     {
         using (LinqToSqlDataContext db = new CSLOrderingARCBAL.LinqToSqlDataContext())
         {
             db.USP_SaveErrorDetails(Request.Url.ToString(), "gvDevicelist_SelectedIndexChanged", Convert.ToString(objException.Message), Convert.ToString(objException.InnerException), Convert.ToString(objException.StackTrace), "", HttpContext.Current.Request.UserHostAddress, false, Convert.ToString(HttpContext.Current.Session[enumSessions.User_Name.ToString()]));
         }
     }
 }
Ejemplo n.º 3
0
    protected void gvDevicelist_SelectedIndexChanged(object sender, EventArgs e)
    {
        int selectedRow = gvDevicelist.SelectedIndex;

        chip.Text         = gvDevicelist.Rows[selectedRow].Cells[1].Text;
        nua_data.Text     = gvDevicelist.Rows[selectedRow].Cells[2].Text;
        esn_sim.Text      = gvDevicelist.Rows[selectedRow].Cells[3].Text;
        SelectedEMNo.Text = Server.HtmlDecode(gvDevicelist.Rows[selectedRow].Cells[4].Text).Trim();
        int Dev_Inst_UnqCode = Convert.ToInt32(gvDevicelist.DataKeys[selectedRow].Values["Dev_Inst_UnqCode"].ToString());

        if (Dev_Inst_UnqCode != 0)
        {
            VW_InstallerDetail installer = CSLOrderingARCBAL.BAL.InstallerBAL.GetInstaller(Dev_Inst_UnqCode.ToString());
            if (installer != null)
            {
                TextBox txtInstaller = (TextBox)rptInstallerCompanies.FindControl("installerCompanyName");
                if (txtInstaller != null)
                {
                    txtInstaller.Text = Session[enumSessions.SelectedInstaller.ToString()].ToString();
                }
            }
        }
        LockSelection();
    }