Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2583", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (!IsPostBack)
            {
                txtBillDate.Text = DateTime.Now.ToString("dd-MM-yyyy");
                txtFromDate.Text = DateTime.Now.ToString("dd-MM-yyyy");
                txtToDate.Text   = DateTime.Now.ToString("dd-MM-yyyy");
                LoadEmptyGrid();
                LoadddlType();
                LoadddlBillingNo();
            }
            if (Session["LookUpData"] != null)
            {
                int intlookupid = Convert.ToInt32(ViewState["lookupid"]);
                lookUptext(intlookupid);

                if (intlookupid == 57)
                {
                    RetrieveMasterData();
                    RetrieveDetailData();
                }
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2575", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty((String)Session["LookUpData"]))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }
            if (!IsPostBack)
            {
                //LoadGRN_DDL();

                txtFromDate.Text = DateTime.Now.ToString("dd-MM-yyyy");
                txtToDate.Text   = DateTime.Now.ToString("dd-MM-yyyy");
            }
            Session["LookUpData"] = null;
        }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["UserName"] == null)
     {
         Response.Redirect("~/login.aspx");
     }
     if (!sec.UserRight("2550", "001"))
     {
         Response.Redirect("~/Test.aspx");
     }
     if (!IsPostBack)
     {
         //ViewState["ObjPOds"] = ObjPOds;
         createPartsDT();
         string[] Columns = new string[] { "CusCode", "CusDesc", "NIC", "Phone1" };
         SysFunc.GetMultiColumnsDDL(ddlCustomer, Columns, "Customer", "DealerCode ='" + Session["DealerCode"].ToString() + "'", "CusCode", " Order by  CusDesc ", false, false);
         Load_ddlSRNo();
         if (txtRetDate.Text.Length == 0)
         {
             txtRetDate.Text = DateTime.Now.ToString("dd/MM/yyyy");
         }
         rdCounterSale.Enabled = false;
         rdJobCard.Enabled     = false;
         rdJobCard.Checked     = false;
         rdCounterSale.Checked = false;
     }
 }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2504", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty((String)Session["LookUpData"]))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }

            if (!IsPostBack)
            {
                ThreadStart childthreat = new ThreadStart(childthreadcall);
                Thread      child       = new Thread(childthreat);

                child.Start();
                LoadGRN_DDL();
                //ddlacount_code.Items.Add(new ListItem("Select", ""));
            }
            Session["LookUpData"] = "";
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["DealerCode"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2565", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Session["LookUpData"].ToString()))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }

            if (!IsPostBack)
            {
                DataSet        ds = new DataSet();
                SqlParameter[] JobCardMaster_param =
                {
                    /*0*/ new SqlParameter("@DealerCode", SqlDbType.Char, 5)
                };
                JobCardMaster_param[0].Value = Session["DealerCode"].ToString();
                objMBLL.FillDrp_SP(ddlRegNo, "sp_2W_LoadChassisEngineRegNo_History", "RegNo", "RegNo", JobCardMaster_param, true, "--Select--", false, "");
                objMBLL.FillDrp_SP(ddlEngineNo, "sp_2W_LoadChassisEngineRegNo_History", "EngineNo", "EngineNo", JobCardMaster_param, true, "--Select--", false, "");
                objMBLL.FillDrp_SP(ddlChassisNo, "sp_2W_LoadChassisEngineRegNo_History", "ChassisNo", "ChassisNo", JobCardMaster_param, true, "--Select--", false, "");
            }

            Session["LookUpData"] = null;
            Session["LookUpData"] = "";
        }
Esempio n. 6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2578", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Session["LookUpData"].ToString()))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }

            if (!IsPostBack)
            {
                ThreadStart childthreat = new ThreadStart(childthreadcall);
                Thread      child       = new Thread(childthreat);

                child.Start();

                //string where = "DealerCode = '" + Session["DealerCode"].ToString() + "'";

                //string[] col = { "PartItemNo", "ItemDesc", "ItemCode" };

                //myFunc.GetMultiColumnsDDL(ddlFromCode, col, "Item", where, "PartItemNo", "", false, false);
                //myFunc.GetMultiColumnsDDL(ddlToCode, col, "Item", where, "PartItemNo", "", false, false);
                Session["LookUpData"] = string.Empty;
            }
        }
Esempio n. 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2581", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Session["LookUpData"].ToString()))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }

            if (!IsPostBack)
            {
                ThreadStart childthreat = new ThreadStart(childthreadcall);
                Thread      child       = new Thread(childthreat);

                child.Start();

                Session["LookUpData"] = string.Empty;
            }
        }
Esempio n. 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (this.Session["UserName"] == null)
                {
                    Response.Redirect("~/login.aspx");
                }
                if (!sec.UserRight("2505", "001"))
                {
                    Response.Redirect("~/Test.aspx");
                }


                if (!Page.IsPostBack)
                {
                    string sql = "Select CusCode , CusDesc , Address1 , CellNo , NIC,NTNno from Customer C WHERE C.DealerCode = '" + Session["DealerCode"].ToString() + "' Order by CusCode Desc";

                    dt = sysfun.GetData(sql);


                    GridView1.DataSource = dt;
                    GridView1.DataBind();
                    if (dt.Rows.Count > 0)
                    {
                        GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
                    }


                    //DataBind();
                    //BindDummyRow();
                }
            }
        }
Esempio n. 9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2549", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            //if (Session["LookUpData"] != null)
            //{
            //    int intlookupid = Convert.ToInt32(ViewState["lookupid"]);
            //    if (txtRemarks.Text.Contains(" "))
            //    {
            //        txtRemarks.Text = "";
            //    }
            //}
            if (!IsPostBack)
            {
                if (txtRetDate.Text.Length == 0)
                {
                    txtRetDate.Text = DateTime.Now.ToString("dd/MM/yyyy");
                }

                Load_ddlReturnNo();
                Load_ddlIssueNo();
                createPartsDT();
            }
        }
Esempio n. 10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2530", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            txtSearch.Attributes.Add("onchange", "setTimeout('__doPostBack(\\'" + txtSearch.ClientID.Replace("_", "$") + "\\',\\'\\')', 0);");
            if (!Page.IsPostBack)
            {
                string sql = "Select  A.cusCode, B.CusDesc as Customer,A.EndUserCode,B.CusDesc as AccountOf,B.cellno as CellNo,A.RegNo,A.ChassisNo,A.EngineNo From CustomerVehicle A" +
                             " inner join Customer B On A.Dealercode = B.DealerCode" +
                             " and A.Cuscode = B.Cuscode where A.DealerCode = '" + Session["DealerCode"].ToString() + "' order by A.CusCode Desc";

                dt = sysfun.GetData(sql);


                GridView1.DataSource = dt;
                GridView1.DataBind();
                if (dt.Rows.Count > 0)
                {
                    GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
                }
                else
                {
                    Label1.ForeColor = System.Drawing.Color.Red;
                    Label1.Text      = "There is no data in the Customer Vehicle";
                }
            }
        }
Esempio n. 11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2539", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            //success_add_item.Visible = false;
            txtliter.Enabled = false;

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Session["LookUpData"].ToString()))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }

            if (!IsPostBack)
            {
                ThreadStart childthreat = new ThreadStart(childthreadcall);
                Thread      child       = new Thread(childthreat);

                child.Start();

                Session["LookUpData"] = string.Empty;

                ddlpart_type.Items.Add(new ListItem("Select", ""));
                ddlpart_type.Items.Add(new ListItem("Lube", "Y"));
                ddlpart_type.Items.Add(new ListItem("Spare", "N"));

                ddlaccess.Items.Add(new ListItem("Select", ""));
                ddlaccess.Items.Add(new ListItem("Yes", "Y"));
                ddlaccess.Items.Add(new ListItem("No", "N"));

                ddlcogs.Items.Add(new ListItem("Select", ""));
                ddlrevenue.Items.Add(new ListItem("Select", ""));
                ddlstockin.Items.Add(new ListItem("Select", ""));
                ddlstockout.Items.Add(new ListItem("Select", ""));

                //ddllocation.Items.Add(new ListItem("Rack A Shelf1", "01A001"));
                //ddllocation.Items.Add(new ListItem("Rack A Shelf2", "01A002"));

                //LoadDDL_Item();
                LoadDDL_Unit();
                LoadDDL_ItemCategory();
                LoadDDL_Location();
                createItemDT();
            }
        }
Esempio n. 12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["UserName"] == null)
     {
         Response.Redirect("~/login.aspx");
     }
     if (!sec.UserRight("2567", "001"))
     {
         Response.Redirect("~/Test.aspx");
     }
     if (!IsPostBack)
     {
         lOADddl();
     }
 }
Esempio n. 13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["UserName"] == null)
     {
         Response.Redirect("~/login.aspx");
     }
     if (!sec.UserRight("2585", "001"))
     {
         Response.Redirect("~/Test.aspx");
     }
     if (!IsPostBack)
     {
         dtTo.Text = dtFrom.Text = DateTime.Now.ToString("dd-MM-yyyy");
     }
 }
Esempio n. 14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2574", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Session["LookUpData"].ToString()))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }

            if (!IsPostBack)
            {
                //MainBLL ObjMainBLL = new MainBLL();
                //ObjMainBLL.FillDrp_SP(ddlFromCode, "sp_2W_Select_Item", "PartItemNo", "ItemDesc", null, true, "--Select--", false, "");

                //string where = "DealerCode = '" + Session["DealerCode"].ToString() + "'";

                //string[] col = { "PartItemNo", "ItemDesc", "ItemCode" };

                ThreadStart childthreat = new ThreadStart(childthreadcall);
                Thread      child       = new Thread(childthreat);

                child.Start();

                Session["LookUpData"] = string.Empty;

                //myFunc.GetMultiColumnsDDL(ddlFromCode, col, "Item", where, "PartItemNo", "", false, false);
                //myFunc.GetMultiColumnsDDL(ddlToCode, col, "Item", where, "PartItemNo", "", false, false);
                //ddlFromCode.DataSource = ObjMainBLL.FillDataSet("sp_2W_Select_Item", null).Tables[0];
                //ddlFromCode.DataValueField = "PartItemNo";
                //ddlFromCode.DataTextField = "ItemDesc";
                //ddlFromCode.DataBind();
                //ObjMainBLL.FillDrp_SP(ddlToCode, "sp_2W_Select_Item", "PartItemNo", "ItemDesc", null, true, "--Select--", false, "");
                //ObjMainBLL.ExecuteQuery("Select ItemCode,PartItemNo,ItemDesc From Item ", ref ds);

                txtFromDate.Text = DateTime.Now.ToString("dd-MM-yyyy");
                txtToDate.Text   = DateTime.Now.ToString("dd-MM-yyyy");
            }
        }
Esempio n. 15
0
        public ActionResult Dealer()
        {
            Session["CompLogo"] = "";
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2504", "001"))
            {
                string DealerCode             = Session["DealerCode"].ToString();
                List <SelectListItem> ddlCity = new List <SelectListItem>();
                ddlCity      = GeneralMethods.GetDataFromSP("Select_City");
                ViewBag.City = ddlCity;



                List <SelectListItem> ddlCountry = new List <SelectListItem>();
                ddlCountry      = GeneralMethods.GetDataFromSP("Select_Country");
                ViewBag.Country = ddlCountry;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }
            return(View());
        }
Esempio n. 16
0
        public ActionResult Customer()
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2502", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                List <SelectListItem> ddlCity = new List <SelectListItem>();
                ddlCity      = GeneralMethods.GetDataFromSP("Select_City");
                ViewBag.City = ddlCity;

                List <SelectListItem> ddlState = new List <SelectListItem>();
                ddlState      = GeneralMethods.GetDataFromSP("Select_State");
                ViewBag.State = ddlState;

                List <SelectListItem> ddlCountry = new List <SelectListItem>();
                ddlCountry      = GeneralMethods.GetDataFromSP("Select_Country");
                ViewBag.Country = ddlCountry;

                //List<SelectListItem> ddlCustomers = new List<SelectListItem>();
                //ddlCustomers = GeneralMethods.GetDataFromSPWithDealerCode("SP_Select_Customer",dealerCode);
                //ViewBag.Customers = ddlCustomers;

                List <SelectListItem> ddlCusType = new List <SelectListItem>();
                ddlCusType      = GeneralMethods.GetDataFromSPWithDealerCode("SP_SelectCustomerType", dealerCode);
                ViewBag.CusType = ddlCusType;

                //DataTable dt = new DataTable();
                //List<CustomerVM> lst = new List<CustomerVM>();

                //SqlParameter[] sqlParam =
                //    {
                //        new SqlParameter("@DealerCode",dealerCode)
                //    };
                //dt = DataAccess.getDataTable("SP_Select_CustomerModal", sqlParam, General.GetBMSConString());

                //if (dt.Rows.Count > 0)
                //{
                //    lst = EnumerableExtension.ToList<CustomerVM>(dt);
                //}
                List <CustomerVM> lstCustommer = CustomerMethods.GetCustomerModal(dealerCode);
                ViewBag.Customer = lstCustommer;

                List <AccountVM> lstAccount = CustomerMethods.Get_AccDesc(dealerCode);
                ViewBag.Accounts = lstAccount;
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }



            return(View());
        }
Esempio n. 17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (this.Session["UserName"] == null)
     {
         Response.Redirect("~/login.aspx");
     }
     if (!sec.UserRight("2503", "001"))
     {
         Response.Redirect("~/Test.aspx");
     }
     if (!IsPostBack)
     {
         ViewData();
         Session["ImagePath"] = string.Empty;
     }
     FileUpload1.Attributes["onchange"] = "UploadFile(this)";
 }
Esempio n. 18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2502", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            txtSearch.Attributes.Add("onchange", "setTimeout('__doPostBack(\\'" + txtSearch.ClientID.Replace("_", "$") + "\\',\\'\\')', 0);");
            hfTab.Value = Request.Form[hfTab.UniqueID];
            if (!Page.IsPostBack)
            {
                GetTotalCount();
                GetPageData(0, 10);


                //string sql = "Select_PendingInv '" + Session["DealerCode"].ToString() + "'   ";
                //string sql1 = "Select_closeJobCard '" + Session["DealerCode"].ToString() + "' ";
                //hfTab.Value = Request.Form[hfTab.UniqueID];



                //dt = sysfun.GetData(sql);
                //dt2 = sysfun.GetData(sql1);

                //GridView1.DataSource = dt;
                //GridView1.DataBind();
                //if (dt.Rows.Count > 0)
                //{
                //    GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;
                //}


                //GridView2.DataSource = dt2;
                //GridView2.DataBind();
                //if (dt2.Rows.Count > 0)
                //{
                //    GridView2.HeaderRow.TableSection = TableRowSection.TableHeader;
                //}

                //DataBind();
                //BindDummyRow();
            }
        }
Esempio n. 19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2530", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty((String)Session["LookUpData"]))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }
            if (!IsPostBack)
            {
                ViewState["CusCode"] = "";

                if (Session["CusCode"] != null)
                {
                    createLubDT();
                    LoadDDLs();

                    string leadId = Session["CusCode"].ToString();
                    ViewState["CusCode"]      = leadId;
                    ddlCustomer.SelectedValue = ViewState["CusCode"].ToString();

                    LoadData();
                }
                else
                {
                    txtChassisNo.Enabled = true;
                    txtEngineNo.Enabled  = true;
                    txtRegNo.Enabled     = true;
                    createLubDT();
                    LoadDDLs();
                }
            }
            Session["LookUpData"] = null;
            Session["CusCode"]    = null;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2551", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (!IsPostBack)
            {
                LoadDDL_TransLoc();

                create_grid();
            }

            success_add_item.Visible = false;
        }
Esempio n. 21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         if (this.Session["UserName"] == null)
         {
             Response.Redirect("~/login.aspx");
         }
         if (!sec.UserRight("2538", "001"))
         {
             Response.Redirect("~/Test.aspx");
         }
         txtSearch.Attributes.Add("onchange", "setTimeout('__doPostBack(\\'" + txtSearch.ClientID.Replace("_", "$") + "\\',\\'\\')', 0);");
         hfTab.Value = Request.Form[hfTab.UniqueID];
         if (!Page.IsPostBack)
         {
             string sql  = "Get_DTRApp_Reject '" + Session["DealerCode"].ToString() + "'";
             string sql1 = "Get_DTR_Approved '" + Session["DealerCode"].ToString() + "'";
             string sql2 = "Get_DTR_Post '" + Session["DealerCode"].ToString() + "'";
             dt  = sysfun.GetData(sql);
             dt2 = sysfun.GetData(sql1);
             dt3 = sysfun.GetData(sql2);
             grvDTR.DataSource = dt;
             grvDTR.DataBind();
             if (dt.Rows.Count > 0)
             {
                 grvDTR.HeaderRow.TableSection = TableRowSection.TableHeader;
             }
             grvCloseDTR.DataSource = dt2;
             grvCloseDTR.DataBind();
             if (dt2.Rows.Count > 0)
             {
                 grvCloseDTR.HeaderRow.TableSection = TableRowSection.TableHeader;
             }
             grvPostDTR.DataSource = dt3;
             grvPostDTR.DataBind();
             if (dt3.Rows.Count > 0)
             {
                 grvPostDTR.HeaderRow.TableSection = TableRowSection.TableHeader;
             }
         }
     }
 }
Esempio n. 22
0
 protected void txtForm_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (!sec.UserRight("2589", "001"))
     {
         Response.Redirect("~/Test.aspx");
     }
     gvPendingVoucher.DataSource = null;
     gvPendingVoucher.DataBind();
     GetData();
 }
Esempio n. 23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            txtDCDate.Text = DateTime.Now.ToString("dd-MM-yyyy");
            txtPODate.Text = DateTime.Now.ToString("dd-MM-yyyy");

            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2542", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Session["LookUpData"].ToString()))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }
            if (!IsPostBack)
            {
                if (Session["TransCode"] != null)
                {
                    createGrid();
                    lOADddl();
                    string leadId = Session["TransCode"].ToString();
                    ddlDCno.SelectedValue = leadId;

                    ddlDCno_SelectedIndexChanged(null, null);
                }
                else
                {
                    lblMode.Text = "Add Mode";
                    createGrid();
                    lOADddl();
                }
            }
            btnValue              = 0;
            Session["TransCode"]  = null;
            Session["LookUpData"] = string.Empty;
        }
Esempio n. 24
0
        // string strSubmitBehavior = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2547", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty((string)Session["LookUpData"]))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }
            if (Page.IsPostBack == false)
            {
                if (Session["TransCode"] != null)
                {
                    txtIssueDate.Text = DateTime.Now.ToString("dd-MM-yyyy");
                    Load_ddlSirNo();
                    createPartsDT();
                    Load_ddlCounterNo();
                    string leadId = Session["TransCode"].ToString();
                    ddlIssueNo.SelectedValue = leadId;

                    ddlIssueNo_SelectedIndexChanged(null, null);
                }
                else
                {
                    lblMode.Text      = "Add Mode";
                    txtIssueDate.Text = DateTime.Now.ToString("dd-MM-yyyy");
                    Load_ddlSirNo();
                    createPartsDT();
                    Load_ddlCounterNo();
                }
            }
            btnValue              = 0;
            Session["TransCode"]  = null;
            Session["LookUpData"] = string.Empty;
        }
Esempio n. 25
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2532", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (ViewState["Veh"] != null)
            {
                Veh = (DataTable)ViewState["Veh"];
            }
            if (ViewState["Item"] != null)
            {
                Item = (DataTable)ViewState["Item"];
            }

            if (Page.IsPostBack)
            {
                if (!string.IsNullOrEmpty(Session["LookUpData"].ToString()))
                {
                    SelectedPartDetail(Session["LookUpData"].ToString());
                }
            }
            if (!Page.IsPostBack)
            {
                setInitialDates();            //-------------------------------------Dates
                createVehicleDT();
            }
            Session["LookUpData"] = string.Empty;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2564", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (!IsPostBack)
            {
                dtTo.Text = dtFrom.Text = DateTime.Now.ToString("dd-MM-yyyy");
                SqlParameter[] JobCardMaster_param =
                {
                    /*0*/ new SqlParameter("@DealerCode", SqlDbType.Char, 5)
                };
                JobCardMaster_param[0].Value = Session["DealerCode"].ToString();

                objMBLL.FillDrp_SP(ddlAdvisorCode, "sp_Get_Advisor", "EmpCode", "EmpName", JobCardMaster_param, true, "Select", false, "");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2579", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }
            if (!IsPostBack)
            {
                DateTime dt = DateTime.Today;

                txtMonth.Text = dt.ToString("MM/yyyy");

                string where = "DealerCode = '" + Session["DealerCode"].ToString() + "'";

                string[] col = { "VendorCode", "VendorDesc" };

                myFunc.GetMultiColumnsDDL(ddlVendor, col, "Vendor", where, "VendorCode", "", false, false);
            }
        }
Esempio n. 28
0
        protected void btn_save_Click(object sender, EventArgs e)
        {
            if (!sec.UserRight("2588", "002"))
            {
                Response.Redirect("~/Test.aspx");
            }

            if (ddlReceiptNo.SelectedIndex == 0)
            {
                SysFuncs.UserMsg(success_add_item, Color.Red, "Please Select  the  Receipt First!");
                return;
            }
            if (ddlpayment_mode.SelectedIndex == 0)
            {
                SysFuncs.UserMsg(success_add_item, Color.Red, "Please Select  the  Payment Mode First!");
                return;
            }
            else
            {
                if (txtRefundCode.Text != "")
                {
                    if (!sec.UserRight("2588", "003"))
                    {
                        Response.Redirect("~/Test.aspx");
                    }
                }
            }
            if (Session["Adj"].ToString() == "Adj")
            {
                Insert_PaymentRefund();
            }
            else
            {
                SysFuncs.UserMsg(success_add_item, Color.Red, "Please Adjust Amount  First!");
                return;
            }
        }
Esempio n. 29
0
        // GET: GeneralReport
        public ActionResult GRMain(string id)
        {
            if (string.IsNullOrEmpty((string)Session["DealerCode"]))
            {
                return(RedirectToAction("NewLogin", "Home"));
            }
            if (common.UserRight("2514", "001"))
            {
                dealerCode = Session["DealerCode"].ToString();

                if (id == "BO")
                {
                    ViewBag.Heading = "Booking Order";
                }
                else if (id == "DO")
                {
                    ViewBag.Heading = "Delivery Order";
                }
                else if (id == "PBN")
                {
                    ViewBag.Heading = "Pending Booking Number";
                }
                //else if (id == "PIN")
                //{
                //    ViewBag.Heading = "Pending Invoice Number";
                //}
                else if (id == "PIN")
                {
                    ViewBag.Heading = "Invoice/UnInvoiced Report";
                }
                else if (id == "PP")
                {
                    ViewBag.Heading = "Pending Payments";
                }

                else
                {
                    ViewBag.Heading = "Vehicle Receipt";
                }
            }
            else
            {
                TempData["TestAccessError"] = MessageAlert.MsgAuthorized();
                return(RedirectToAction("Error", "Definition"));
            }
            return(View());
        }
Esempio n. 30
0
        //string LoginID = "", DealerCode = "", UserID = "", StrMachineIP = "";

        protected void Page_Load(object sender, EventArgs e)
        {
            if (this.Session["UserName"] == null)
            {
                Response.Redirect("~/login.aspx");
            }
            if (!sec.UserRight("2540", "001"))
            {
                Response.Redirect("~/Test.aspx");
            }

            //LoginID = SessionInformation.LoginID;
            //DealerCode = SessionInformation.DealerCode;
            //UserID = SessionInformation.UserName;
            //StrMachineIP = SessionInformation.MachineIP;
            if (Page.IsPostBack == false)
            {
                Load_ddlLocCode();
            }
        }