示例#1
0
        protected void btnmailordersubmit_Click(object sender, EventArgs e)
        {
            if (hfdmailid.Value == "0")
            {
                string notnew = "";
                if (chknotnew.Checked == false)
                {
                    notnew = "No";
                }
                else
                {
                    notnew = "Yes";
                }

                Utilities_Licensing.Insertmailored(hfdperid.Value, ddlmailorderstatus.SelectedValue, txteffectivedate.Text, txtexpirydate.Text, notnew, Session["UID"].ToString());
                altbox("Record inserted successfully.");

                ddlmailorderstatus.SelectedIndex = -1;
                hfdmailid.Value       = "0";
                txteffectivedate.Text = "";
                txtexpirydate.Text    = "";
                chknotnew.Checked     = false;
            }
            else
            {
                Utilities_Licensing.UpdateMailorder(Convert.ToInt32(hfdmailid.Value), ddlmailorderstatus.SelectedValue, txteffectivedate.Text.ToString(), txtexpirydate.Text.ToString(), Session["UID"].ToString(), DateTime.Now.ToString());
                altbox("Record updated successfully.");

                ddlmailorderstatus.SelectedIndex = -1;
                hfdmailid.Value       = "0";
                txteffectivedate.Text = "";
                txtexpirydate.Text    = "";
                chknotnew.Checked     = false;
            }
        }