Exemplo n.º 1
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     try
     {
         if (Request.QueryString[0].Equals("VIEW"))
         {
             CancelRecord();
         }
         else
         {
             if (CheckValid())
             {
                 popUpPanel5.Visible = true;
                 // ModalPopupPrintSelection.TargetControlID = "btnCancel";
                 ModalPopupPrintSelection.Show();
             }
             else
             {
                 CancelRecord();
             }
         }
     }
     catch (Exception ex)
     {
         CommonClasses.SendError("Batch Ticket", "btnCancel_Click", ex.Message.ToString());
     }
 }
Exemplo n.º 2
0
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     try
     {
         if (Request.QueryString[0].Equals("VIEW"))
         {
             Response.Redirect("~/Transactions/VIEW/ViewTurningInward.aspx", false);
         }
         else
         {
             if (CheckValid())
             {
                 ModalPopupPrintSelection.TargetControlID = "btnCancel";
                 ModalPopupPrintSelection.Show();
                 popUpPanel5.Visible = true;
             }
             else
             {
                 CancelRecord();
             }
         }
     }
     catch (Exception Ex)
     {
         CommonClasses.SendError("Material Inward", "btnCancel_Click", Ex.Message);
     }
 }
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        //try
        //{
        //    Response.Redirect("~/Masters/ADD/SalesDefault.aspx", false);
        //}
        //catch (Exception)
        //{

        //}
        try
        {
            if (CheckValid())
            {
                popUpPanel5.Visible = true;
                //ModalPopupPrintSelection.TargetControlID = "btnCancel";
                ModalPopupPrintSelection.Show();
            }
            else
            {
                CancelRecord();
            }
        }
        catch (Exception ex)
        {
            CommonClasses.SendError("Currency Order", "btnCancel_Click", ex.Message.ToString());
        }
    }
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        //if (mlCode != 0 && mlCode != null)
        //{
        //    CommonClasses.RemoveModifyLock("ISSUE_MASTER", "MODIFY", "IM_CODE", mlCode);
        //}

        //((DataTable)ViewState["dt2"]).Rows.Clear();
        //Response.Redirect("~/Transactions/VIEW/ViewIssueToProduction.aspx", false)
        try
        {
            if (Request.QueryString[0].Equals("VIEW"))
            {
                CancelRecord();
            }
            else
            {
                if (CheckValid())
                {
                    popUpPanel5.Visible = true;
                    //ModalPopupPrintSelection.TargetControlID = "btnCancel";
                    ModalPopupPrintSelection.Show();
                }
                else
                {
                    CancelRecord();
                }
            }
        }
        catch (Exception ex)
        {
            CommonClasses.SendError("Issue To Production", "btnCancel_Click", ex.Message.ToString());
        }
    }
 protected void btnCancel_Click(object sender, EventArgs e)
 {
     try
     {
         if (Request.QueryString[0].Equals("VIEW"))
         {
             CancelRecord();
         }
         else
         {
             if (CheckValid())
             {
                 ModalPopupPrintSelection.TargetControlID = "btnCancel";
                 ModalPopupPrintSelection.Show();
                 popUpPanel5.Visible = true;
             }
             else
             {
                 CancelRecord();
             }
         }
     }
     catch (Exception Ex)
     {
         CommonClasses.SendError("Customer Type Master", "btnCancel_Click", Ex.Message);
     }
 }
    protected void ddlPrintOpt_SelectedIndexChanged(object sender, EventArgs e)
    {
        //if (ddlPrintOpt.SelectedValue == "1")
        //{
        ModalPopupPrintSelection.Show();
        lblPrintCopy.Visible  = true;
        chkPrintCopy1.Visible = true;
        chkPrintCopy2.Visible = true;
        chkPrintCopy3.Visible = true;
        chkPrintCopy4.Visible = true;
        return;
        //}
        //if (ddlPrintOpt.SelectedValue == "2")
        //{
        //    ModalPopupPrintSelection.Show();
        //    lblPrintCopy.Visible = false;
        //    chkPrintCopy1.Visible = false;
        //    chkPrintCopy2.Visible = false;
        //    chkPrintCopy3.Visible = false;
        //    chkPrintCopy4.Visible = false;
        //    return;
        //}
        //else
        //{

        //}
    }
    protected void btnOk_Click(object sender, EventArgs e)
    {
        try
        {
            if (ddlPrintOpt.SelectedValue == "0")
            {
                PanelMsg.Visible = true;
                lblmsg.Text      = "Please Select print Option";
                ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert1();", true);
                ModalPopupPrintSelection.Show();
                return;
            }
            if (chkPrintCopy1.Checked == true)
            {
            }
            else if (chkPrintCopy2.Checked == true)
            {
            }
            else if (chkPrintCopy3.Checked == true)
            {
            }
            else if (chkPrintCopy4.Checked == true)
            {
            }
            else
            {
                PanelMsg.Visible = true;
                lblmsg.Text      = "Please Select Print No. Of Copies";
                ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert1();", true);
                ModalPopupPrintSelection.Show();
                return;
            }

            //if (ddlPrintOpt.SelectedValue != "0")
            //{
            //    if (ddlPrintOpt.SelectedValue == "2")
            //    {
            //        Response.Redirect("~/RoportForms/ADD/CustomerSchedulePrint.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&code=" + Code + "&type=" + type + "", false);
            //    }
            //}
            //if (ddlPrintOpt.SelectedValue == "1")
            //{
            if (type == "Single")
            {
                if (chkPrintCopy1.Checked == true)
                {
                    Response.Redirect("~/RoportForms/ADD/CustomerSchedulePrint.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint1=" + chkPrintCopy1.Text + "&code=" + Code + "&type=" + type + "", false);
                }
                if (chkPrintCopy2.Checked == true)
                {
                    Response.Redirect("~/RoportForms/ADD/CustomerSchedulePrint.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint2=" + chkPrintCopy2.Text + "&code=" + Code + "&type=" + type + "", false);
                }
                if (chkPrintCopy3.Checked == true)
                {
                    Response.Redirect("~/RoportForms/ADD/CustomerSchedulePrint.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint3=" + chkPrintCopy3.Text + "&code=" + Code + "&type=" + type + "", false);
                }
                if (chkPrintCopy4.Checked == true)
                {
                    Response.Redirect("~/RoportForms/ADD/CustomerSchedulePrint.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint4=" + chkPrintCopy4.Text + "&code=" + Code + "&type=" + type + "", false);
                }
            }
            else
            {
                if (chkPrintCopy1.Checked == true)
                {
                    //Response.Redirect("~/RoportForms/VIEW/ViewInvoiceReport.aspx?inv_code=" + inv_code + "&type=" + type, false);
                    Response.Redirect("~/RoportForms/VIEW/ViewInvoiceReport.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint1=" + 1 + "&code=" + Code + "&type=" + type + "", false);
                }
                if (chkPrintCopy2.Checked == true)
                {
                    Response.Redirect("~/RoportForms/VIEW/ViewInvoiceReport.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint1=" + 2 + "&code=" + Code + "&type=" + type + "", false);
                }
                if (chkPrintCopy3.Checked == true)
                {
                    Response.Redirect("~/RoportForms/VIEW/ViewInvoiceReport.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint1=" + 3 + "&code=" + Code + "&type=" + type + "", false);
                }
                if (chkPrintCopy4.Checked == true)
                {
                    Response.Redirect("~/RoportForms/VIEW/ViewInvoiceReport.aspx?Title=" + Title + "&Cond=" + ddlPrintOpt.SelectedValue + "&chkPrint1=" + 4 + "&code=" + Code + "&type=" + type + "", false);
                }
            }
            //}
        }
        catch (Exception Ex)
        {
            CommonClasses.SendError("Invoice Print ", "btnOk_Click", Ex.Message);
        }
    }
 protected void chk1_CheckedChanged(object sender, EventArgs e)
 {
     ModalPopupPrintSelection.Show();
 }
 protected void dgCustomerSchedule_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     try
     {
         if ((string)e.CommandArgument == "0" || (string)e.CommandArgument == "")
         {
             return;
         }
         if (e.CommandName.Equals("View"))
         {
             if (CommonClasses.ValidRights(int.Parse(right.Substring(1, 1)), this, "For View"))
             {
                 string type     = "VIEW";
                 string inv_code = e.CommandArgument.ToString();
                 Response.Redirect("~/Transactions/ADD/CustomerSchedule.aspx?c_name=" + type + "&inv_code=" + inv_code, false);
             }
             else
             {
                 PanelMsg.Visible = true;
                 lblmsg.Text      = "You Have No Rights To View";
                 ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);
                 return;
             }
         }
         if (e.CommandName.Equals("Modify"))
         {
             if (CommonClasses.ValidRights(int.Parse(right.Substring(2, 1)), this, "For Modify"))
             {
                 if (!ModifyLog(e.CommandArgument.ToString()))
                 {
                     string type     = "MODIFY";
                     string inv_code = e.CommandArgument.ToString();
                     Response.Redirect("~/Transactions/ADD/CustomerSchedule.aspx?c_name=" + type + "&inv_code=" + inv_code, false);
                 }
             }
             else
             {
                 PanelMsg.Visible = true;
                 lblmsg.Text      = "You Have No Rights To Modify";
                 ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);
                 return;
             }
         }
         if (e.CommandName.Equals("Print"))
         {
             if (CommonClasses.ValidRights(int.Parse(right.Substring(5, 1)), this, "For Print"))
             {
                 if (!ModifyLog(e.CommandArgument.ToString()))
                 {
                     //string type = rbReportType.SelectedValue.ToString();  //&rptType=" + rptType + "
                     string inv_code = e.CommandArgument.ToString();
                     Code = inv_code;
                     type = "Single";
                     //Response.Redirect("~/RoportForms/ADD/CustomerSchedulePrint.aspx?inv_code=" + inv_code + "&type=" + type, false);
                     popUpPanel5.Visible = true;
                     ModalPopupPrintSelection.Show();
                     return;
                 }
             }
             else
             {
                 PanelMsg.Visible = true;
                 lblmsg.Text      = "You Have No Rights To Print";
                 ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);
                 return;
             }
         }
         if (e.CommandName.Equals("PrintMult"))
         {
             if (!ModifyLog(e.CommandArgument.ToString()))
             {
                 //string type = "MODIFY";
                 string inv_code = e.CommandArgument.ToString();
                 type = "Mult";
                 //Response.Redirect("~/RoportForms/VIEW/ViewInvoiceReport.aspx?inv_code=" + inv_code + "&type=" + type, false);
                 popUpPanel5.Visible = true;
                 ModalPopupPrintSelection.Show();
                 return;
             }
         }
     }
     catch (Exception Ex)
     {
         CommonClasses.SendError("Customer Schedule", "dgCustomerSchedule_RowCommand", Ex.Message);
     }
 }
Exemplo n.º 10
0
    protected void dgInvoiceDettail_RowCommand(object sender, GridViewCommandEventArgs e)
    {
        try
        {
            if (e.CommandName.Equals("View"))
            {
                if (CommonClasses.ValidRights(int.Parse(right.Substring(1, 1)), this, "For View"))
                {
                    string type     = "VIEW";
                    string inv_code = e.CommandArgument.ToString();
                    Response.Redirect("~/Transactions/ADD/ExportInvoice.aspx?c_name=" + type + "&inv_code=" + inv_code, false);
                }
                else
                {
                    PanelMsg.Visible = true;
                    lblmsg.Text      = "You Have No Rights To View";
                    ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);

                    return;
                }
            }
            if (e.CommandName.Equals("Modify"))
            {
                if (CommonClasses.ValidRights(int.Parse(right.Substring(2, 1)), this, "For Modify"))
                {
                    if (!ModifyLog(e.CommandArgument.ToString()))
                    {
                        string type     = "MODIFY";
                        string inv_code = e.CommandArgument.ToString();

                        Response.Redirect("~/Transactions/ADD/ExportInvoice.aspx?c_name=" + type + "&inv_code=" + inv_code, false);
                    }
                    else
                    {
                        PanelMsg.Visible = true;
                        lblmsg.Text      = "Record Is Used By Another Person";
                        ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);

                        return;
                    }
                }
                else
                {
                    PanelMsg.Visible = true;
                    lblmsg.Text      = "You Have No Rights To Modify";
                    ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);

                    return;
                }
            }
            if (e.CommandName.Equals("Print"))
            {
                if (CommonClasses.ValidRights(int.Parse(right.Substring(5, 1)), this, "For Print"))
                {
                    string inv_code = e.CommandArgument.ToString();
                    Code = inv_code;
                    popUpPanel5.Visible = true;
                    ModalPopupPrintSelection.Show();

                    return;
                }
                else
                {
                    PanelMsg.Visible = true;
                    lblmsg.Text      = "You Have No Rights To Print";
                    ScriptManager.RegisterStartupScript(this, GetType(), "displayalertmessage", "Showalert();", true);

                    return;
                }
                // Response.Redirect("~/RoportForms/ADD/ExportInvoicePrint.aspx?inv_code=" + inv_code, false);
            }
        }
        catch (Exception Ex)
        {
            CommonClasses.SendError("Export Invoice View", "dgInvoiceDettail_RowCommand", Ex.Message);
        }
    }