Пример #1
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (txt_Name.Text != string.Empty && txtAddress.Text != string.Empty && ddl_address_type.SelectedValue != "-1" && ddl_PS.SelectedValue != "-1" && txtAddress1.Text != string.Empty && txtAddress2.Text != string.Empty && txtAddress3.Text != string.Empty && txtCST.Text != string.Empty && txtVAT.Text != string.Empty)
        {
            bool result = BusinessServices.Imaging_Admin_address_Insert(txt_Name.Text.Trim(), txtAddress.Text.Trim(), txtAddress1.Text.Trim(), txtAddress2.Text.Trim(), txtAddress3.Text.Trim(), txtVAT.Text.Trim(), txtCST.Text.Trim(), ddl_address_type.SelectedItem.Value.ToString(), ddl_PS.SelectedItem.Value.ToString());
            if (result)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Created Successfully..');</script>", false);
                txt_Name.Text    = "";
                txtVAT.Text      = "";
                txtAddress.Text  = "";
                txtAddress1.Text = "";
                txtAddress2.Text = "";
                txtAddress3.Text = "";
                txtCST.Text      = "";
                txtVAT.Text      = "";
                ddl_address_type.SelectedValue = "-1"; ddl_PS.SelectedValue = "-1";
                GetGrd(); lbl_msg.Text         = "";
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Creation Failed..');</script>", false);
            }
        }

        else
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Fill the Required Fields");
        }
    }
Пример #2
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        if (txtCategory.Text != string.Empty)
        {
            DataTable Dt = new DataTable();
            Dt = BusinessServices.PreventDublicate(txtCategory.Text.ToString());
            if (Dt.Rows.Count > 0)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Vertical is alredy existed..');</script>", false);
            }
            else
            {
                bool result = BusinessServices.Imaging_Admin_Vertical_Insert(txtCategory.Text.Trim());
                if (result)
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Created Successfully..');</script>", false);
                    txtCategory.Text = "";

                    GetGrd1(); lbl_msg.Text = "";
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Creation Failed..');</script>", false);
                }
            }
        }

        else
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Fill the Required Fields");
        }
    }
Пример #3
0
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        if (txtusername.Text.Trim() != string.Empty && txtusername.Text.Trim() != "Username" && txtpassword.Text.Trim() != string.Empty && txtpassword.Text.Trim() != "password")
        {
            string    userName = txtusername.Text.Trim();
            string    password = txtpassword.Text.Trim();
            DataTable dt       = BusinessServices.Imaging_Login(userName, password);
            if (dt.Rows.Count > 0)
            {
                Session["Id"]            = dt.Rows[0]["Id"].ToString();
                Session["FullName"]      = dt.Rows[0]["FullName"].ToString();
                Session["LoginName"]     = dt.Rows[0]["LoginName"].ToString();
                Session["UserType"]      = dt.Rows[0]["UserType"].ToString();
                Session["EmailId"]       = dt.Rows[0]["EmailId"].ToString();
                Session["IsAdminFlag"]   = dt.Rows[0]["IsAdminFlag"].ToString();
                Session["IsActive"]      = dt.Rows[0]["IsActive"].ToString();
                Session["IsAprovalFlag"] = dt.Rows[0]["IsAprovalFlag"].ToString();
                if (Session["RetrivalValue"] == null)
                {
                    Response.Redirect("Workflow.aspx", false);
                }
                else
                {
                    Response.Redirect("PurchaseOrderInvoiceApproval.aspx", false);
                }
            }
            else
            {
                AlertPageHelper.ShowAlert(this.Page, "User Name or Password not matching..");
                txtpassword.Text = "";
                txtusername.Text = "";
            }
        }
        else if ((txtusername.Text.Trim() == "Username" || txtusername.Text.Trim() == "") && (txtpassword.Text.Trim() == "Password" || txtpassword.Text.Trim() == ""))
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Fill UserName and Password");
        }
        else if (txtusername.Text.Trim() == "Username" || txtusername.Text.Trim() == "")
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Fill UserName");
        }
        else if (txtpassword.Text.Trim() == "Password" || txtpassword.Text.Trim() == "")
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Fill Password");
        }

        else
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Fill UserName and Password");
        }
    }
Пример #4
0
    protected void btnSave_Click(object sender, EventArgs e)
    {
        string convalue = txt_Tax_Con_Value.Text.Trim();

        if (convalue != string.Empty)
        {
            if (txtTax_Description.Text != string.Empty && txtTax_Percentage.Text != string.Empty && ddl_Type.SelectedValue != "-1" && ddl_Category.SelectedValue != "-1")
            {
                bool result = BusinessServices.Imaging_Admin_Tax_Insert(ddl_Type.SelectedItem.Value.ToString(), txtTax_Description.Text.Trim(), Convert.ToInt32(ddl_Category.SelectedItem.Value.ToString()), txtTax_Percentage.Text.Trim(), txt_Tax_Con_Value.Text.Trim());
                if (result)
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Created Successfully..');</script>", false);
                    txt_Tax_Con_Value.Text = ""; txtTax_Description.Text = ""; txtTax_Percentage.Text = "";


                    ddl_Type.SelectedValue = "-1"; ddl_Category.SelectedValue = "-1";
                    GetGrd();
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Creation Failed..');</script>", false);
                }
            }

            else
            {
                AlertPageHelper.ShowAlert(this.Page, "Please Fill the Required Fields");
            }
        }
        else
        {
            bool result = BusinessServices.Imaging_Admin_Tax_Insert_withoutconvalue(ddl_Type.SelectedItem.Value.ToString(), txtTax_Description.Text.Trim(), Convert.ToInt32(ddl_Category.SelectedItem.Value.ToString()), txtTax_Percentage.Text.Trim());
            if (result)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Created Successfully..');</script>", false);
                txt_Tax_Con_Value.Text = ""; txtTax_Description.Text = ""; txtTax_Percentage.Text = "";


                ddl_Type.SelectedValue = "-1"; ddl_Category.SelectedValue = "-1";
                GetGrd();
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('Creation Failed..');</script>", false);
            }
        }
    }
    protected void BtnExport_Click(object sender, EventArgs e)
    {
        if (TxtFromDate.Text != string.Empty)
        {
            DateTime FromDate = Convert.ToDateTime(TxtFromDate.Text.ToString());

            DateTime ToDate = Convert.ToDateTime(txtTodate.Text.ToString());
            //if (fromdate.Date < DateTime.Today)
            //{
            DataSet ds = new DataSet();

            DataTable dt_values = ClsReportStock.Report_Stock(FromDate, ToDate, ddlLocation.SelectedItem.ToString());

            if (dt_values.Rows.Count > 1)
            {
                //  downloadExcelSheet(dt_values, "Stock Statement");
                ds.Tables.Add(dt_values);

                ds.Tables[0].TableName = "Daily Stock Details";


                ExcelHelper.ToExcel(ds, "DailyStockDetails.xls", Page.Response);
            }
            else
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "Alert", "<script>alert('No Records Found...');</script>", false);
            }

            //}
            //else
            //{
            //    AlertPageHelper.ShowAlert(this.Page, "Please select the correct date,Date should be less than today's date");
            //}
        }

        else
        {
            AlertPageHelper.ShowAlert(this.Page, "Please select the date");
        }
    }
Пример #6
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (txtEmailID.Text.Trim() != string.Empty)
        {
            DataTable dt = BusinessServices.Imaging_forgotPassword_GetData(txtEmailID.Text.Trim());

            if (dt.Rows.Count > 0)
            {
                string email = dt.Rows[0][1].ToString();
                if (email == null || email == "")
                {
                    AlertPageHelper.ShowAlert(this.Page, "Please contact IT team for your password");
                    txtEmailID.Text = "";
                }
                else
                {
                    if (BusinessServices.Imaging_ForgotPassword_Insert(Convert.ToInt32(dt.Rows[0][0].ToString()), email))
                    {
                        AlertPageHelper.ShowAlert(this.Page, "Login credentials has been sent to your email address..");
                        txtEmailID.Text = "";
                    }
                    else
                    {
                        AlertPageHelper.ShowAlert(this.Page, "Please try again, To get our password.");
                    }
                }
            }
            else
            {
                AlertPageHelper.ShowAlert(this.Page, "Email ID not registered,Please Enter Correct Email ID.");
                // txtEmailID.Text = "";
            }
        }
        else
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Enter Email Address.");
        }
    }
Пример #7
0
    protected void btncheck_Click(object sender, EventArgs e)
    {
        if (txtpassword.Text.Trim() != string.Empty)
        {
            DataTable dt = BusinessServices.Imaging_LockScreen_GetPassword(txtpassword.Text.Trim(), Convert.ToInt32(Session["Id"].ToString()));

            if (dt.Rows.Count > 0)
            {

                Response.Redirect("Workflow.aspx");

            }
            else
            {
                AlertPageHelper.ShowAlert(this.Page, "Please Enter Correct Password");
            }


        }
        else
        {
            AlertPageHelper.ShowAlert(this.Page, "Please Enter the Password");
        }
    }