예제 #1
0
        protected void lbtSave_Click(object sender, EventArgs e)
        {
            OtherPayBill opbEnt = new OtherPayBill();

            opbEnt.PayBillNo            = rtbPayBillNo.Text;
            opbEnt.PayType              = rcbPayType.SelectedValue;
            opbEnt.LogisticsCompanyName = rtbLogisticsCompanyName.Text;
            opbEnt.InvoiceNo            = rtbInvoiceNo.Text;
            opbEnt.InvoiceAmount        = Convert.ToDecimal(rntbInvoiceAmount.Text);
            opbEnt.InterfaceArray       = rtbInterfaceArray.Text;
            opbEnt.ShouldPayAmount      = Convert.ToDecimal(rntbShouldPayAmount.Text);
            opbEnt.Remark     = rtbRemark.Text;
            opbEnt.PayState   = "未付款";
            opbEnt.CreateTime = System.DateTime.Now;
            opbEnt.CreateId   = WebPortalService.CurrentUserInfo.UserID;
            opbEnt.CreateName = WebPortalService.CurrentUserInfo.Name;
            opbEnt.DoCreate();
            //付款单创建完毕后将关联的物流单的付款状态改为  已提交
            string[] temparray = opbEnt.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
            for (int i = 0; i < temparray.Length; i++)
            {
                Logistic lEnt = Logistic.Find(temparray[i]);
                lEnt.PayState = "已提交";
                lEnt.DoUpdate();
            }
            ClientScript.RegisterStartupScript(GetType(), "submit", "window.opener.location.reload();window.close();", true);
            lbtSave.Visible = false;
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            switch (RequestActionString)
            {
            case "batchdelete":
                IList <object> idList = RequestData.GetList <object>("IdList");
                if (idList != null && idList.Count > 0)
                {
                    foreach (object obj in idList)
                    {
                        OtherPayBill opbEnt = OtherPayBill.Find(obj.ToString());
                        //string[] temparray = opbEnt.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                        //for (int i = 0; i < temparray.Length; i++)
                        //{
                        //    Logistic lEnt = Logistic.Find(temparray[i]);
                        //    lEnt.PayState = "未付款";
                        //    lEnt.DoUpdate();
                        //}
                        opbEnt.DoDelete();
                    }
                    PageState.Add("Message", "删除成功!");
                }
                break;

            default:
                DoSelect();
                break;
            }
        }
예제 #3
0
        string type = String.Empty; // 对象类型
        protected void Page_Load(object sender, EventArgs e)
        {
            string db = ConfigurationManager.AppSettings["ExamineDB"];

            op   = RequestData.Get <string>("op");
            id   = RequestData.Get <string>("id");
            type = RequestData.Get <string>("type");

            OtherPayBill ent = null;

            switch (RequestActionString)
            {
            case "create":
                ent            = GetPostedData <OtherPayBill>();
                ent.CreateName = UserInfo.Name;
                ent.CreateTime = System.DateTime.Now;
                ent.CreateId   = UserInfo.UserID;
                ent.PayState   = "未付款";
                ent.DoCreate();
                string[] temparray = ent.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                for (int i = 0; i < temparray.Length; i++)
                {
                    Logistic lEnt = Logistic.Find(temparray[i]);
                    lEnt.PayState = "已提交";
                    lEnt.DoUpdate();
                }
                break;

            default:
                break;
            }
            PageState.Add("PayBillNo", DataHelper.QueryValue("select SHHG_AimExamine.dbo.fun_GetOtherPayBillNo()"));
        }
예제 #4
0
        string type = String.Empty; // 对象类型
        protected void Page_Load(object sender, EventArgs e)
        {
            op = RequestData.Get <string>("op");
            id = RequestData.Get <string>("id");
            OtherPayBill ent = null;

            switch (RequestActionString)
            {
            case "create":
                ent            = GetPostedData <OtherPayBill>();
                ent.CreateName = UserInfo.Name;
                ent.CreateTime = System.DateTime.Now;
                ent.CreateId   = UserInfo.UserID;
                ent.PayState   = "未付款";
                ent.DoCreate();
                break;

            case "update":
                ent = GetMergedData <OtherPayBill>();
                ent.DoUpdate();
                break;

            default:
                break;
            }
            if (op == "c")
            {
                PageState.Add("PayBillNo", DataHelper.QueryValue("select SHHG_AimExamine.dbo.fun_GetOtherPayBillNo()"));
            }
            else
            {
                ent = OtherPayBill.Find(id);
                SetFormData(ent);
            }
        }
예제 #5
0
        string type = String.Empty; // 对象类型
        protected void Page_Load(object sender, EventArgs e)
        {
            op = RequestData.Get <string>("op");
            id = RequestData.Get <string>("id");
            OtherPayBill ent = null;

            switch (RequestActionString)
            {
            case "update":
                ent = OtherPayBill.Find(id);
                string nowPayAmount = RequestData.Get <string>("NowPayAmount");
                if (!string.IsNullOrEmpty(nowPayAmount))
                {
                    ent.AcctualPayAmount = (ent.AcctualPayAmount.HasValue ? ent.AcctualPayAmount : 0) + Convert.ToDecimal(nowPayAmount);
                    if (ent.AcctualPayAmount == ent.ShouldPayAmount)
                    {
                        ent.PayState    = "已付款";
                        ent.PayTime     = System.DateTime.Now;
                        ent.PayUserId   = UserInfo.UserID;
                        ent.PayUserName = UserInfo.Name;
                    }
                    ent.DoUpdate();
                }
                if (ent.PayType == "物流付款" && ent.PayState == "已付款")
                {
                    string[] temparray = ent.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                    for (int i = 0; i < temparray.Length; i++)
                    {
                        Logistic lEnt = Logistic.Find(temparray[i]);
                        lEnt.PayState = "已付款";
                        lEnt.DoUpdate();
                    }
                }
                break;

            default:
                break;
            }
            if (op != "c" && op != "cs")
            {
                if (!String.IsNullOrEmpty(id))
                {
                    ent = OtherPayBill.Find(id);
                    SetFormData(ent);
                    PageState.Add("PayType", ent.PayType);
                    if (ent.PayType == "物流付款")
                    {
                        string[] array = ent.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                        PageState.Add("DataList", Logistic.FindAllByPrimaryKeys(array));
                    }
                }
            }
        }
예제 #6
0
        string type = String.Empty; // 对象类型
        protected void Page_Load(object sender, EventArgs e)
        {
            op = RequestData.Get <string>("op");
            id = RequestData.Get <string>("id");
            OtherPayBill ent = null;

            if (op != "c" && op != "cs")
            {
                if (!String.IsNullOrEmpty(id))
                {
                    ent = OtherPayBill.Find(id);
                    PageState.Add("PayType", ent.PayType);
                    SetFormData(ent);
                    if (ent.PayType == "物流付款")
                    {
                        string[] array = ent.InterfaceArray.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries);
                        PageState.Add("DataList", Logistic.FindAllByPrimaryKeys(array));
                    }
                }
            }
        }