Example #1
0
 protected void fillstate()
 {
     MasterData mdl = new MasterData();
     DataTable dt = new DataTable();
     dt = mdl.Getstate();
     CommonFunction.CommonFun objcf = new CommonFunction.CommonFun();
     objcf.FillDropDownList(ddlstate, dt, "state_name", "state_id");
     //DropDownList ddlstatenc = Repnearbymetro.Controls[Repnearbymetro.Controls.Count - 1].FindControl("ddlstatenc") as DropDownList;
     //objcf.FillDropDownList(ddlstatenc, dt, "state_name", "state_id");
 }
Example #2
0
        protected void Repnearbymetro_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Footer)
            {
                MasterData mdl = new MasterData();
                DataTable dt = new DataTable();
                CommonFunction.CommonFun objcf = new CommonFunction.CommonFun();
                DropDownList ddlcitynearby = e.Item.FindControl("ddlcitynearby") as DropDownList;

                dt = mdl.GetCityStates();
                objcf.FillDropDownList(ddlcitynearby, dt, "City_Name", "City_id");
                dt = mdl.Getstate();
                DropDownList ddlstatenc = e.Item.FindControl("ddlstatenc") as DropDownList;
                objcf.FillDropDownList(ddlstatenc, dt, "state_name", "state_id");
                MasterData objmst = new MasterData();
                dt = new DataTable();
                dt = objmst.Getcountry();
                DropDownList ddlcountrync = e.Item.FindControl("ddlcountrync") as DropDownList;
                objcf.FillDropDownList(ddlcountrync, dt, "Country_Name", "Country_ID");
            }
        }
Example #3
0
 public void fillcountry()
 {
     MasterData objmst = new MasterData();
     DataTable dt = objmst.Getcountry();
     CommonFun objcf = new CommonFun();
     objcf.FillDropDownList(ddlcountry, dt, "Country_Name", "Country_ID");
     //DropDownList ddlcountrync = Repnearbymetro.Controls[Repnearbymetro.Controls.Count - 1].FindControl("ddlcountrync") as DropDownList;
     //objcf.FillDropDownList(ddlcountrync, dt, "Country_Name", "Country_ID");
 }
 //protected void ddltitle_SelectedIndexChanged(object sender, EventArgs e)
 //{
 //    DropDownList ddlfirstname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddlfirstname");
 //    DropDownList ddltitle = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddltitle");
 //    Label lblfax = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblfax");
 //    Label lblemail = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblemail");
 //    Label lblphone = (Label)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("lblphone");
 //    TextBox txtfirstname = (TextBox)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("txtfirstname");
 //    DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname");
 //    AjaxControlToolkit.AutoCompleteExtender acefirstname = (AjaxControlToolkit.AutoCompleteExtender)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("acefirstname");
 //    acefirstname.ContextKey = ddltitle.SelectedValue;
 //    txtfirstname.Text = string.Empty;
 //    ListItem li = ddllastname.Items[0];
 //    ddllastname.Items.Clear();
 //    ddllastname.Items.Add(li);
 //    lblfax.Text = string.Empty;
 //    lblemail.Text = string.Empty;
 //    lblphone.Text = string.Empty;
 //    loadPersonalFirstName();
 //}
 protected void txtfirstname_TextChanged(object sender, EventArgs e)
 {
     DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname");
     TextBox txtfirstname = (TextBox)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("txtfirstname");
     ddllastname.Focus();
     PresenterData objpres = new PresenterData();
     DataTable dt = objpres.GetPersonalName(txtfirstname.Text, "", "L", "Y");
     CommonFun objcf = new CommonFun();
     objcf.FillDropDownList(ddllastname, dt, "PERSONAL_FNAME", "PERSONAL_ID");
     if (dt.Rows.Count == 1)
     {
         ddllastname.SelectedIndex = 1;
         hdnfirstnameid.Value = ddllastname.SelectedItem.Value;
         loadphonedetails();
         setneweditlink();
     }
     setneweditlink();
 }
 protected void RepDetails_ItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Footer)
     {
         CommonFun objcf = new CommonFun();
         //  DropDownList ddltitle = (DropDownList)e.Item.FindControl("ddltitle");
         DropDownList ddlfirstname = (DropDownList)e.Item.FindControl("ddlfirstname");
         //MasterData objmst = new MasterData();
         // DataTable dt = objmst.Gettitle();
         // objcf.FillDropDownList(ddltitle, dt, "title_name", "title_id");
         // ddltitle.Items.RemoveAt(0);
         loadPersonalFirstName();
     }
 }
        public void loadPersonalLastName()
        {
            DropDownList ddlfirstname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddlfirstname");
            DropDownList ddllastname = (DropDownList)RepDetails.Controls[RepDetails.Controls.Count - 1].FindControl("ddllastname");
            PresenterData objpres = new PresenterData();
            DataTable dt = objpres.GetPersonalName(ddlfirstname.SelectedItem.Text, "", "L", "Y");

            CommonFun objcf = new CommonFun();
            objcf.FillDropDownList(ddllastname, dt, "PERSONAL_FNAME", "PERSONAL_ID");
            if (dt.Rows.Count == 1)
            {
                ddllastname.SelectedIndex = 1;
                hdnfirstnameid.Value = ddllastname.SelectedItem.Value;
            }
            loadphonedetails();
            ddllastname.Focus();
        }
Example #7
0
        public BoxofficeOvrr Getboxofcoverridedat(int boid)
        {
            BoxofficeOvrr bo = new BoxofficeOvrr();
            CommonFun objcf = new CommonFun();
            SqlCommand cmd = new SqlCommand("sp_getBoxOfficeOverride", dbconn);
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.Clear();
            cmd.Parameters.AddWithValue("@ID", boid);
            DataTable dt = new DataTable();

            try
            {
                dbconn.Open();
                SqlDataReader dr = cmd.ExecuteReader();
                dt.Load(dr);
                if (dt != null)
                {
                    if (dt.Rows.Count > 0)
                    {

                        for (int i = 0 ; i< dt.Rows.Count  ;i++)
                        {
                            bo.bo_override = (Convert.ToString(dt.Rows[i]["bo_override"]));
                            bo.bo_sub_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][1]));
                            bo.bo_sub_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][2]));
                            bo.bo_sub_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][3]));
                            bo.bo_sub_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][4]));
                            bo.bo_ph_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][5]));
                            bo.bo_ph_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][6]));
                            bo.bo_ph_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][7]));
                            bo.bo_ph_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][8]));
                            bo.bo_web_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][9]));
                            bo.bo_web_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][10]));
                            bo.bo_web_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][11]));
                            bo.bo_web_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][12]));
                            bo.bo_cc_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][13]));
                            bo.bo_cc_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][14]));
                            bo.bo_cc_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][15]));
                            bo.bo_cc_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][16]));
                            bo.bo_outlet_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][17]));
                            bo.bo_outlet_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][18]));
                            bo.bo_outlet_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][19]));
                            bo.bo_outlet_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][20]));
                            bo.bo_single_tix_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][21]));
                            bo.bo_single_tix_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][22]));
                            bo.bo_single_tix_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][23]));
                            bo.bo_single_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][24]));
                            bo.bo_small_group_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][25]));
                            bo.bo_small_group_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][26]));
                            bo.bo_small_group_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][27]));
                            bo.bo_small_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][28]));
                            bo.bo_large_group_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i][29]));
                            bo.bo_large_group_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i][30]));
                            bo.bo_large_group_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][31]));
                            bo.bo_large_tax_ff_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i][32]));
                            bo.bo_other_per_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other_per_ff"]));
                            bo.bo_other_per_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other_per_tax1"]));
                            bo.bo_other_per_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other_per_net_comm"]));
                            bo.bo_other_usd_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other_usd_ff"]));
                            bo.bo_other_usd_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other_usd_tax1"]));
                            bo.bo_other_usd_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other_usd_net_comm"]));
                            bo.bo_other3_t_sold = Convert.ToInt16(dt.Rows[i]["bo_other3_t_sold"]);
                            bo.bo_other3_gross_rcpt = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other3_gross_rcpt"]));
                            bo.bo_other3_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other3_ff"]));
                            bo.bo_other3_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other3_tax1"]));
                            bo.bo_other3_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other3_net_comm"]));
                            bo.bo_other4_t_sold = Convert.ToInt16(dt.Rows[i]["bo_other4_t_sold"]);
                            bo.bo_other4_gross_rcpt = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other4_gross_rcpt"]));
                            bo.bo_other4_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other4_ff"]));
                            bo.bo_other4_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other4_tax1"]));
                            bo.bo_other4_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other4_net_comm"]));
                            bo.bo_other5_t_sold = Convert.ToInt16(dt.Rows[i]["bo_other5_t_sold"]);
                            bo.bo_other5_gross_rcpt = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other5_gross_rcpt"]));
                            bo.bo_other5_ff = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other5_ff"]));
                            bo.bo_other5_tax1 = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other5_tax1"]));
                            bo.bo_other5_net_comm = objcf.ToDecimal(Convert.ToString(dt.Rows[i]["bo_other5_net_comm"]));

                        }

                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (dbconn.State == ConnectionState.Open) { dbconn.Close(); }
            }

            return bo;
        }