コード例 #1
0
    protected void btnOK_Click(object sender, EventArgs e)
    {
        Guid KeyIdGuid;
        if (this.KeyId == string.Empty)
        {
            //�����ݱ��浽�ͻ���cookie
            HttpCookie myCookie = new HttpCookie("EmailSetting");

            myCookie.Values.Add("EmailTo", rtxtTo.Text.Trim());
            myCookie.Expires = System.DateTime.Now.AddDays(1);
            Response.AppendCookie(myCookie);

            Response.Redirect("~/Schedule Billing/TaskDetailForm.aspx");
        }
        else
        {
            KeyIdGuid = new Guid(this.KeyId);//ת����Guid����
            SchedulerObj = new tblScheduler();
            SchedulerObj.EmailTo = rtxtTo.Text.Trim();
            SchedulerObj.ScheduleID = KeyIdGuid;
            BLL_ScheduleTasks = new ScheduleTasksBLL();
            successFlag = BLL_ScheduleTasks.UpdateInEmailForm(SchedulerObj);
            if (!successFlag.Equals("InsertError"))
            {
                Response.Redirect("~/Schedule Billing/TaskDetailForm.aspx?KeyGuid=" + this.KeyId);
            }
            else
            {
                //������ʾ��Ϣ
                MessageBox(false, false, true,
                        GetGlobalResourceObject("WebResource", "EmailSettingForm_UpdateEmailSetting_ErrorMessage").ToString());
            }
        }
    }
コード例 #2
0
 protected void GetData()
 {
     if (this.KeyId!=string.Empty)
     {
         BLL_ScheduleTasks = new ScheduleTasksBLL();
         SchedulerObj=BLL_ScheduleTasks.FindSchedulerById(this.KeyId);
     }
 }
コード例 #3
0
    protected void GetData()
    {
        string whereStr;
        string orderBy;

        whereStr = "";
        orderBy = "it.EmailFrom desc";
        BLL_ScheduleTasks = new ScheduleTasksBLL();
        vBackupAndEmailSettingObj = BLL_ScheduleTasks.GetBackupAndEmailSetting(whereStr, orderBy);
        if (vBackupAndEmailSettingObj.Count()>0)
        {
            foreach (var item in vBackupAndEmailSettingObj)
            {
                this.TempKeyId = item.BackupID.ToString();
            }
        }
    }
コード例 #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        vUTPScheduleMessager vScheduleLogObj;
        tblScheduler SchedulerObj;

        if (!IsPostBack)
        {
            if (Request.QueryString["KeyGuid"] != null && Request.QueryString["KeyGuid"] != string.Empty)
            {
                KeyId = Request.QueryString["KeyGuid"].ToString();
                BLL_ScheduleLog = new vScheduleLogBLL();
                //��ʾUserName��Ϣ
                vScheduleLogObj = BLL_ScheduleLog.FindUserNameByScheduleId(KeyId);
                if (vScheduleLogObj!=null)
                {
                    lbl_UserName.Text = vScheduleLogObj.UserName;
                }
                //��ʾTaskName
                BLL_ScheduleTasks = new ScheduleTasksBLL();
                SchedulerObj = BLL_ScheduleTasks.FindSchedulerById(KeyId);
                lbl_TaskName.Text = SchedulerObj.TaskName.Substring(0, SchedulerObj.TaskName.LastIndexOf("-"));
            }
        }
        GridViewDataBinding(KeyId);
    }
コード例 #5
0
    protected void rbtnOK_Click(object sender, EventArgs e)
    {
        System.Guid KeyIdGuid;
        string successFlag;//������ݿ�����Ƿ�ɹ�

        int startCycleIndex=0;
        int endCycleIndex = 0;
        startCycleIndex = rctxtStartingCycle.SelectedIndex;
        endCycleIndex = rctxtStartingCycle.FindItemIndexByValue(rctxtEndingCycle.SelectedValue);

        if (rctxtCompany.SelectedValue != "N/A" && rctxtStartingCycle.SelectedValue != "N/A" && rctxtEndingCycle.SelectedValue != "N/A")
        {
            if (startCycleIndex < endCycleIndex || startCycleIndex == endCycleIndex)
            {
                if (this.KeyId == string.Empty)//����
                {
                    //�����ݱ��浽�ͻ���cookie
                    HttpCookie myCookie = new HttpCookie("Billing");

                    if (rctxtCompany.SelectedItem != null)
                    {
                        myCookie.Values.Add("Company", rctxtCompany.SelectedItem.Value);
                    }

                    if (rctxtStartingCycle.SelectedItem != null)
                    {
                        myCookie.Values.Add("StartingCycle", rctxtStartingCycle.SelectedItem.Value);
                    }

                    if (rctxtEndingCycle.SelectedItem != null)
                    {
                        myCookie.Values.Add("EndingCycle", rctxtEndingCycle.SelectedItem.Value);
                    }

                    if (rctxtStatusCode.SelectedItem != null)
                    {
                        myCookie.Values.Add("StatusCode", rctxtStatusCode.SelectedItem.Value);
                    }

                    myCookie.Values.Add("AllCycles", chkAllCycles.Checked.ToString());
                    myCookie.Values.Add("Copy", chkCopy.Checked.ToString());
                    myCookie.Values.Add("Calc", chkCalc.Checked.ToString());

                    myCookie.Expires = System.DateTime.Now.AddDays(1);
                    Response.AppendCookie(myCookie);
                    Response.Redirect("~/Schedule Billing/TaskDetailForm.aspx");
                }
                else//����
                {
                    SchedulerObj = new tblScheduler();
                    HttpCookie UserData = Request.Cookies.Get("UserIdCookies");
                    if (UserData != null)
                    {
                        SchedulerObj.UTPUser = UserData.Value;
                    }
                    HttpCookie UserPasswordData = Request.Cookies.Get("UserPasswordCookies");
                    if (UserPasswordData != null)
                    {
                        SchedulerObj.UTPPwd = UserPasswordData.Value;
                    }
                    if (rctxtCompany.SelectedItem != null)
                    {
                        SchedulerObj.Company = rctxtCompany.SelectedItem.Value;
                    }

                    if (rctxtStartingCycle.SelectedItem != null && rctxtEndingCycle.SelectedItem != null)
                    {
                        SchedulerObj.Cycle = rctxtStartingCycle.SelectedItem.Value + "," + rctxtEndingCycle.SelectedItem.Value;
                    }

                    if (rctxtStatusCode.SelectedItem != null)
                    {
                        SchedulerObj.Status = rctxtStatusCode.SelectedItem.Value;
                    }

                    SchedulerObj.Copy = chkCopy.Checked.ToString();
                    SchedulerObj.Calc = chkCalc.Checked.ToString();

                    KeyIdGuid = new Guid(this.KeyId);//ת����Guid����

                    SchedulerObj.ScheduleID = KeyIdGuid;

                    BLL_ScheduleTasks = new ScheduleTasksBLL();
                    successFlag = BLL_ScheduleTasks.UpdateInBillingPage(SchedulerObj);
                    if (!successFlag.Equals("InsertError"))
                    {
                        //�����ݱ��浽�ͻ���cookie
                        HttpCookie myCookie = new HttpCookie("Billing");

                        myCookie.Values.Add("billingEdit", "billingEdit");

                        myCookie.Expires = System.DateTime.Now.AddDays(1);
                        Response.AppendCookie(myCookie);

                        Response.Redirect("~/Schedule Billing/TaskDetailForm.aspx?KeyGuid=" + this.KeyId);
                    }
                    else
                    {
                        //������ʾ��Ϣ
                        MessageBox(false, false, true,
                                GetGlobalResourceObject("WebResource", "BillingForm_SaveMessage_ErrorMessage").ToString());
                    }
                }
            }
            else//EndCycle<startCycle
            {
                MessageBox(false, true, false,
                                GetGlobalResourceObject("WebResource", "BillingForm_SelectCycleMessage_Message").ToString());
            }
        }
        else//Cycle��������Ч
        {
            MessageBox(false, true, false,
                                GetGlobalResourceObject("WebResource", "BillingForm_ConpanyCycle_Message").ToString());
        }
    }