Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Utilities_Operations.BindDropdown(ddlpaymenttype, 30);
         Utilities_Operations.Fill_Dropdown(ddlsfeetype);
         Utilities_Operations.Fill_Login(ddlforward, "tbl_Login Order by LastName", "FirstName+' '+LastName", "loginID", " ", "Select");
         Utilities_Operations.Fill_Login(ddlmailclerk, "tbl_Login Order by LastName", "FirstName+' '+LastName", "loginID", " ", "Select");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            lbltransationdate.Text = DateTime.Now.ToString("MM/dd/yyyy");

            //OperationsLink.Operations.GetReceiptData(Request.QueryString[0].ToString());
            //lbl_receivedfrom.Text = (new System.Collections.Generic.Mscorlib_CollectionDebugView<OperationsLink.USP_Operations_GetAddlog_paymentreceiptResult>(OperationsLink.Operations.GetReceiptData(Request.QueryString[0].ToString()))).Items[0].From_Received;

            OperationsLink.tbl_Add_Log Obj = Utilities_Operations.Edit_ManageLogs(Convert.ToInt32(Request.QueryString[0].ToString()));

            lbl_receivedfrom.Text = Obj.From_Received;
            lbl_license.Text      = Obj.SSN;
            lbl_amt.Text          = Obj.Amount.ToString();
            // lbl_paymenttype.Text = Obj.PaymentType;
            //  lbl_received.Text = Obj.MailClerk;
            lbl_chknum.Text = Obj.CheckNumber;


            string strFeeType = Obj.Feetype;

            switch (strFeeType)
            {
            case "1":
                lbl_feetype.Text = "Apprentice Renewal";
                break;

            case "2":
                lbl_feetype.Text = "Initial Apprentice";
                break;

            case "3":
                lbl_feetype.Text = "Journey man renewal";
                break;

            case "4":
                lbl_feetype.Text = "Journey man renewal";
                break;

            case "5":
                lbl_feetype.Text = "Replacement Card";
                break;

            case "6":
                lbl_feetype.Text = "Temporary Journeyman";
                break;

            default:
                lbl_feetype.Text = " ";
                break;
            }



            lbl_receipt.Text = Obj.ReceiptNum;

            string strPaymentType = Obj.PaymentType;

            switch (strPaymentType)
            {
            case "537":
                lbl_paymenttype.Text = "Cash";
                break;

            case "538":
                lbl_paymenttype.Text = "MO";
                break;

            case "539":
                lbl_paymenttype.Text = "CC";
                break;

            case "540":
                lbl_paymenttype.Text = "Business Check";
                break;

            case "541":
                lbl_paymenttype.Text = "Personal Check";
                break;

            case "542":
                lbl_paymenttype.Text = "Cahiers Check";
                break;

            case "543":
                lbl_paymenttype.Text = "No Money";
                break;

            default:
                lbl_paymenttype.Text = " ";
                break;
            }
        }
        protected void btnedit_click(object sender, EventArgs e)
        {
            string value = hfdselid.Value;

            OperationsLink.tbl_Add_Log Obj = Utilities_Operations.Edit_ManageLogs(Convert.ToInt32(value));
            hfdautoid.Value          = Obj.Add_log_ID.ToString();
            txtdatetreceiveedit.Text = Convert.ToDateTime(Obj.Date_Received).ToString("MM/dd/yyyy");
            txtaddlogfrom.Text       = Obj.From_Received;
            txtaddlogssn.Text        = Obj.SSN;
            txtspecialentry.Text     = Obj.SpecialEntries;
            txtamount.Text           = Obj.Amount.ToString();

            string ddlforwardvalue = "";

            ddlforwardvalue = Obj.Forward_To;

            if (ddlforward.Items[0].Text != ddlforwardvalue)
            {
                ddlforward.Items[0].Selected = false;
                ddlforward.Items.FindByValue(ddlforwardvalue).Selected = true;
            }


            string MailClerkvalue = "";

            MailClerkvalue = Obj.MailClerk;

            if (ddlmailclerk.Items[0].Text != MailClerkvalue)
            {
                ddlmailclerk.Items[0].Selected = false;
                ddlmailclerk.Items.FindByValue(MailClerkvalue).Selected = true;
            }

            string Ckwalkin = "";

            Ckwalkin = Obj.Walkin;
            if (Obj.Walkin == "True")
            {
                chk_walkin.Checked = true;
            }
            else
            {
                chk_walkin.Checked = false;
            }


            string ddlPay = "";

            ddlPay = Obj.PaymentType;
            ddlpaymenttype.ClearSelection();

            if (ddlpaymenttype.Items[0].Text != ddlPay)
            {
                ddlpaymenttype.Items[0].Selected = false;
                ddlpaymenttype.Items.FindByValue(ddlPay).Selected = true;
            }



            if (ddlpaymenttype.Items.FindByValue(ddlPay).ToString() == "Cashier's Check" || ddlpaymenttype.Items.FindByValue(ddlPay).ToString() == "Business Check" || ddlpaymenttype.Items.FindByValue(ddlPay).ToString() == "Personal Check")
            {
                checknu.Style.Add(HtmlTextWriterStyle.Display, "block");
                lblcred.Text = "Check #";
                checknum.Style.Add(HtmlTextWriterStyle.Display, "block");
                txtchecknumber.Text = Obj.CheckNumber;
            }

            if (ddlpaymenttype.Items.FindByValue(ddlPay).ToString() == "Money Order")
            {
                checknu.Style.Add(HtmlTextWriterStyle.Display, "block");
                lblcred.Text = "Money Order #";
                checknum.Style.Add(HtmlTextWriterStyle.Display, "block");
                txtchecknumber.Text = Obj.CheckNumber;
            }

            if (Obj.Walkin == "True")
            {
                // string str = "document.getElementById('feetype').style.display='block';";
                string ddlFType = "";
                ddlFType = Obj.Feetype;
                ddlfeetype.ClearSelection();


                if (ddlfeetype.Items[0].Text != ddlFType)
                {
                    ddlfeetype.Items[0].Selected = false;
                    ddlfeetype.Items.FindByValue(ddlFType).Selected = true;
                }
            }

            //XXXXX

            string js = "Openapplication();";

            ScriptManager.RegisterStartupScript(Page, GetType(), "scr", js, true);
        }