コード例 #1
0
        private string updateaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag   = "1";
            string result = "";;

            try
            {
                Business.Base.BusinessCustInfo bc = new project.Business.Base.BusinessCustInfo();
                bc.load(jp.getValue("id"));

                collection.Add(new JsonStringValue("CustNo", bc.Entity.CustNo));
                collection.Add(new JsonStringValue("CustName", bc.Entity.CustName));
                collection.Add(new JsonStringValue("CustType", bc.Entity.CustType));
                collection.Add(new JsonStringValue("Contact", bc.Entity.Contact));
                collection.Add(new JsonStringValue("Tel", bc.Entity.Tel));
                collection.Add(new JsonStringValue("Addr", bc.Entity.Addr));
                collection.Add(new JsonStringValue("Website", bc.Entity.Website));
                collection.Add(new JsonStringValue("Remark", bc.Entity.Remark));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "update"));
            collection.Add(new JsonStringValue("flag", flag));

            result = collection.ToString();

            return(result);
        }
コード例 #2
0
        private string deleteaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessOrderType bc = new project.Business.Base.BusinessOrderType();
                bc.load(jp.getValue("id"), user.Entity.AccID);
                if (obj.ExecuteDataSet("select 1 from WO_WorkOrder where OrderType='" + bc.Entity.OrderTypeNo + "' and AccID='" + user.Entity.AccID + "'").Tables[0].Rows.Count > 0)
                {
                    flag = "3";
                }
                else
                {
                    int r = bc.delete();
                    if (r <= 0)
                    {
                        flag = "2";
                    }
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "delete"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList()));

            return(collection.ToString());
        }
コード例 #3
0
        private string applyrefundsubmitaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Op.BusinessContract bc = new Business.Op.BusinessContract();
                bc.load(jp.getValue("id"));
                if (bc.Entity.OffLeaseStatus != "1")
                {
                    flag = "3";
                }
                else
                {
                    bc.Entity.OffLeaseStatus       = "2";
                    bc.Entity.OffLeaseApplyDate    = GetDate();
                    bc.Entity.OffLeaseScheduleDate = ParseDateForString(jp.getValue("OffLeaseScheduleDate"));
                    bc.Entity.OffLeaseReason       = jp.getValue("OffLeaseReason");
                    bc.refund();
                }
            }
            catch { }

            collection.Add(new JsonStringValue("type", "applyrefundsubmit"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(jp.getValue("ContractNoS"), jp.getValue("ContractNoManualS"), jp.getValue("ContractTypeS"),
                                                                     jp.getValue("ContractSPNoS"), jp.getValue("ContractCustNoS"), jp.getValue("MinContractSignedDate"), jp.getValue("MaxContractSignedDate"),
                                                                     jp.getValue("MinContractEndDate"), jp.getValue("MaxContractEndDate"), jp.getValue("OffLeaseStatusS"), jp.getValue("MinOffLeaseActulDate"),
                                                                     jp.getValue("MaxOffLeaseActulDate"), ParseIntForString(jp.getValue("page")))));
            return(collection.ToString());
        }
コード例 #4
0
ファイル: WorkOrderFee.cs プロジェクト: luowenyuyu/DorllyWork
        private string detailaction(JsonArrayParse jp)
        {
            System.Text.StringBuilder sb         = new System.Text.StringBuilder("");
            JsonObjectCollection      collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Order.BusinessWorkOrderFee bc = new project.Business.Order.BusinessWorkOrderFee();
                bc.load(jp.getValue("id"), user.Entity.AccID);

                sb.Append("<table class=\"table table-border table-bordered table-hover table-bg table-sort\" id=\"tablelist\">");
                sb.Append("<thead>");
                sb.Append("<tr class=\"text-c\">");
                sb.Append("<th width=\"5%\">序号</th>");
                sb.Append("<th width='15%'>填写人</th>");
                sb.Append("<th width='16%'>收款项目</th>");
                sb.Append("<th width='30%'>说明</th>");
                sb.Append("<th width='16%'>收款金额</th>");
                sb.Append("<th width='18%'>操作</th>");
                sb.Append("</tr>");
                sb.Append("</thead>");

                int r = 1;
                sb.Append("<tbody>");
                Business.Order.BusinessWorkOrderFeeDetail bc1 = new project.Business.Order.BusinessWorkOrderFeeDetail();
                foreach (Entity.Order.EntityWorkOrderFeeDetail it in bc1.GetWorkOrderFeeDetailQuery(user.Entity.AccID, bc.Entity.FeeNo, bc.Entity.OrderNo, string.Empty, string.Empty, default(DateTime), default(DateTime)))
                {
                    sb.Append("<tr class=\"text-c\" id=\"" + it.InnerEntityOID + "\">");
                    sb.Append("<td align='center'>" + r.ToString() + "</td>");
                    sb.Append("<td>" + it.UserName + "</td>");
                    sb.Append("<td>" + it.FeeTypeName + "</td>");
                    if (bc.Entity.Status == "OPEN")
                    {
                        sb.Append("<td><input type=\"text\" class=\"input-text size-S\" style=\"width:100%\" placeholder=\"\" id=\"Cont" + it.InnerEntityOID + "\" value=\"" + it.Context + "\"></td>");
                        sb.Append("<td><input type=\"text\" class=\"input-text size-S\" style=\"width:100%\" placeholder=\"\" onblur=\"validDecimal(this.id)\" id=\"Amt" + it.InnerEntityOID + "\" value=\"" + it.FeeAmount.ToString("0.##") + "\"></td>");
                        sb.Append("<td><a href=\"javascript:;\" onclick=\"save('" + it.InnerEntityOID + "')\" class=\"btn btn-primary radius\"><i class=\"Hui-iconfont\">&#xe632;</i> 保存</a></td>");
                    }
                    else
                    {
                        sb.Append("<td>" + it.Context + "</td>");
                        sb.Append("<td>" + it.FeeAmount.ToString("0.##") + "</td>");
                        sb.Append("<td></td>");
                    }
                    sb.Append("</tr>");

                    r++;
                }
                sb.Append("</tbody>");
                sb.Append("</table>");

                collection.Add(new JsonStringValue("liststr", sb.ToString()));
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "detail"));
            collection.Add(new JsonStringValue("flag", flag));

            return(collection.ToString());
        }
コード例 #5
0
ファイル: Room.cs プロジェクト: luowenyuyu/DorllyOrder
        private string unreserveaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessRoom bc = new project.Business.Base.BusinessRoom();
                bc.load(jp.getValue("id"));
                if (bc.Entity.RMStatus == "reserve")
                {
                    int r = bc.unreserve();
                    if (r <= 0)
                    {
                        flag = "4";
                    }
                }
                else
                {
                    flag = "3";
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "unreserve"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(jp.getValue("RMIDS"), jp.getValue("RMLOCNo1S"), jp.getValue("RMLOCNo2S"), jp.getValue("RMLOCNo3S"),
                                                                     jp.getValue("RMLOCNo4S"), jp.getValue("CustNoS"), jp.getValue("RMStatusS"), ParseIntForString(jp.getValue("page")))));
            return(collection.ToString());
        }
コード例 #6
0
        private string updateaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag   = "1";
            string result = "";;

            try
            {
                Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo();
                bc.load(jp.getValue("id"));

                collection.Add(new JsonStringValue("UserNo", bc.Entity.UserNo));
                collection.Add(new JsonStringValue("UserName", bc.Entity.UserName));
                collection.Add(new JsonStringValue("UserType", bc.Entity.UserType));
                collection.Add(new JsonStringValue("DeptNo", bc.Entity.DeptNo));
                collection.Add(new JsonStringValue("Tel", bc.Entity.Tel));
                collection.Add(new JsonStringValue("Email", bc.Entity.Email));
                collection.Add(new JsonStringValue("Addr", bc.Entity.Addr));
                collection.Add(new JsonStringValue("Manager", bc.Entity.Manager));
                collection.Add(new JsonStringValue("ManagerName", bc.Entity.ManagerName));
                collection.Add(new JsonStringValue("Picture", bc.Entity.Picture));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "update"));
            collection.Add(new JsonStringValue("flag", flag));

            result = collection.ToString();

            return(result);
        }
コード例 #7
0
        private string newpasswordaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo();
                bc.load(jp.getValue("id"));
                string newpwd = getRandom();

                bc.Entity.Password = Encrypt.EncryptDES(newpwd, "1");
                int r = bc.changepwd();
                if (r <= 0)
                {
                    flag = "2";
                }

                collection.Add(new JsonStringValue("type", "newpassword"));
                collection.Add(new JsonStringValue("flag", flag));
                collection.Add(new JsonStringValue("newpassword", newpwd));
            }
            catch
            { flag = "2"; }
            return(collection.ToString());
        }
コード例 #8
0
        private string deleteaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            foreach (string it in jp.getValue("details").Split(';'))
            {
                if (it == "")
                {
                    continue;
                }
                Business.Order.BusinessWorkOrderMsg msg = new Business.Order.BusinessWorkOrderMsg();
                msg.load(it, user.Entity.AccID);
                if (msg.Entity.IsDel == false)
                {
                    msg.delete();
                }
            }

            collection.Add(new JsonStringValue("type", "select"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(int.Parse(jp.getValue("page")))));

            return(collection.ToString());
        }
コード例 #9
0
ファイル: LateFee.cs プロジェクト: luowenyuyu/NewDorllyOrder
        private string getFeeAction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            int flag = 0;

            try
            {
                string fee     = string.Empty;
                string lateFee = string.Empty;

                StringBuilder sb = new StringBuilder("SELECT SRVNo,SRVName FROM Mstr_Service WHERE SRVStatus=1 ");
                sb.AppendFormat("AND SRVSPNo='{0}' ", jp.getValue("SPNo"));
                fee     = JsonConvert.SerializeObject(obj.PopulateDataSet(sb.ToString() + "AND SRVTypeNo1!='FWLB-007'").Tables[0]);
                lateFee = JsonConvert.SerializeObject(obj.PopulateDataSet(sb.ToString() + "AND SRVTypeNo1='FWLB-007'").Tables[0]);
                collection.Add(new JsonStringValue("FeeList", fee));
                collection.Add(new JsonStringValue("LateFeeList", lateFee));
                flag = 1;
            }
            catch (Exception ex)
            {
                collection.Add(new JsonStringValue("ex", ex.ToString()));
            }
            collection.Add(new JsonStringValue("type", "getFee"));
            collection.Add(new JsonNumericValue("flag", flag));
            return(collection.ToString());
        }
コード例 #10
0
ファイル: Customer.cs プロジェクト: luowenyuyu/NewDorllyOrder
        private string deleteaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessCustomer bc = new project.Business.Base.BusinessCustomer();
                bc.load(jp.getValue("id"));

                //if (obj.PopulateDataSet("select 1 from Mstr_Customer where CustNo='" + bc.Entity.CustNo + "'").Tables[0].Rows.Count > 0)
                //{
                //    flag = "3";
                //}
                //else
                //{
                int r = bc.delete();
                if (r <= 0)
                {
                    flag = "2";
                }
                //}
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "delete"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(jp.getValue("CustNoS"), jp.getValue("CustNameS"), jp.getValue("CustTypeS"), jp.getValue("CustStatusS"), ParseIntForString(jp.getValue("page")))));

            return(collection.ToString());
        }
コード例 #11
0
        /*
         * 新增获取下拉列表数据
         */
        private string GetServiceType(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            int flag = 0;

            try
            {
                string parentNo = string.IsNullOrEmpty(jp.getValue("parentNo")) ? "null" : jp.getValue("parentNo");
                Business.Base.BusinessServiceType bst = new Business.Base.BusinessServiceType();
                var serviceList = new List <EntityServiceType>();
                foreach (EntityServiceType item in bst.GetListQuery(string.Empty, string.Empty, parentNo, string.Empty, true))
                {
                    serviceList.Add(item);
                }
                collection.Add(new JsonStringValue("data", JsonConvert.SerializeObject(serviceList.Select(a => new { a.SRVTypeNo, a.SRVTypeName }))));
                collection.Add(new JsonStringValue("bindID", jp.getValue("bindID")));
                collection.Add(new JsonStringValue("selectNo", jp.getValue("selectNo")));
            }
            catch (Exception ex)
            {
                flag = 2;
                collection.Add(new JsonStringValue("ex", ex.ToString()));
            }
            collection.Add(new JsonStringValue("type", "getServiceType"));
            collection.Add(new JsonNumericValue("flag", flag));
            return(collection.ToString());
        }
コード例 #12
0
ファイル: Customer.cs プロジェクト: luowenyuyu/NewDorllyOrder
        private string updateaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessCustomer bc = new project.Business.Base.BusinessCustomer();
                bc.load(jp.getValue("id"));

                collection.Add(new JsonStringValue("CustNo", bc.Entity.CustNo));
                collection.Add(new JsonStringValue("CustName", bc.Entity.CustName));
                collection.Add(new JsonStringValue("CustShortName", bc.Entity.CustShortName));
                collection.Add(new JsonStringValue("CustType", bc.Entity.CustType));
                collection.Add(new JsonStringValue("Representative", bc.Entity.Representative));
                collection.Add(new JsonStringValue("BusinessScope", bc.Entity.BusinessScope));
                collection.Add(new JsonStringValue("CustLicenseNo", bc.Entity.CustLicenseNo));
                collection.Add(new JsonStringValue("RepIDCard", bc.Entity.RepIDCard));
                collection.Add(new JsonStringValue("CustContact", bc.Entity.CustContact));
                collection.Add(new JsonStringValue("CustTel", bc.Entity.CustTel));
                collection.Add(new JsonStringValue("CustContactMobile", bc.Entity.CustContactMobile));
                collection.Add(new JsonStringValue("CustEmail", bc.Entity.CustEmail));
                collection.Add(new JsonStringValue("CustBankTitle", bc.Entity.CustBankTitle));
                collection.Add(new JsonStringValue("CustBankAccount", bc.Entity.CustBankAccount));
                collection.Add(new JsonStringValue("CustBank", bc.Entity.CustBank));
                collection.Add(new JsonStringValue("IsExternal", (bc.Entity.IsExternal ? "1" : "0")));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "update"));
            collection.Add(new JsonStringValue("flag", flag));

            return(collection.ToString());
        }
コード例 #13
0
ファイル: Bank.cs プロジェクト: luowenyuyu/NewDorllyOrder
        private string validaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessBank bc = new project.Business.Base.BusinessBank();
                bc.load(jp.getValue("id"));
                bc.Entity.Valid = !bc.Entity.Valid;
                int r = bc.Save("update");
                if (r <= 0)
                {
                    flag = "2";
                }
                if (!bc.Entity.Valid)
                {
                    collection.Add(new JsonStringValue("stat", "<span class=\"label radius\">禁用</span>"));
                }
                else
                {
                    collection.Add(new JsonStringValue("stat", "<span class=\"label label-success radius\">正常</span>"));
                }

                collection.Add(new JsonStringValue("id", jp.getValue("id")));
            }
            catch { flag = "2"; }


            collection.Add(new JsonStringValue("type", "valid"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList()));
            return(collection.ToString());
        }
コード例 #14
0
ファイル: FlowNode.cs プロジェクト: luowenyuyu/DorllyWork
        private string submitaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessFlowNode bc = new project.Business.Base.BusinessFlowNode();

                bc.load(jp.getValue("id"), user.Entity.AccID);
                bc.Entity.OpNo   = jp.getValue("OpNo");
                bc.Entity.OpName = jp.getValue("OpName");
                int r = bc.Save("update");
                if (r <= 0)
                {
                    flag = "2";
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "submit"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList()));

            return(collection.ToString());
        }
コード例 #15
0
        private string genorderaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            string TabName = "Tmp" + getRandom();

            obj.ExecuteNonQuery("CREATE TABLE " + TabName + "(OrderID NVARCHAR(36))");
            foreach (string str in jp.getValue("OrderID").Split(';'))
            {
                if (str == "")
                {
                    continue;
                }
                obj.ExecuteNonQuery("INSERT INTO " + TabName + " VALUES('" + str + "')");
            }

            string InfoBar = GenOrderFromLateFeeOrder(TabName, jp.getValue("ARDate"), jp.getValue("EndDate"), user.Entity.UserName);

            if (InfoBar != "")
            {
                flag = "2";
                collection.Add(new JsonStringValue("InfoBar", InfoBar));
            }

            collection.Add(new JsonStringValue("type", "genorder"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(jp.getValue("Month"), jp.getValue("ARDate"), jp.getValue("EndDate"), jp.getValue("OrderType"))));
            return(collection.ToString());
        }
コード例 #16
0
ファイル: LateFee.cs プロジェクト: luowenyuyu/NewDorllyOrder
        private string updateaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessLateFee bc = new project.Business.Base.BusinessLateFee();
                bc.load(jp.getValue("id"));
                collection.Add(new JsonStringValue("SPNo", bc.Entity.SPNo));
                collection.Add(new JsonStringValue("SRVNo", bc.Entity.SRVNo));
                collection.Add(new JsonStringValue("LateFeeSRVNo", bc.Entity.LateFeeSRVNo));
                StringBuilder sb = new StringBuilder("SELECT SRVNo,SRVName FROM Mstr_Service WHERE SRVStatus=1 ");
                sb.AppendFormat("AND SRVSPNo='{0}' ", bc.Entity.SPNo);
                string fee     = JsonConvert.SerializeObject(obj.PopulateDataSet(sb.ToString() + "AND SRVTypeNo1!='FWLB-007'").Tables[0]);
                string lateFee = JsonConvert.SerializeObject(obj.PopulateDataSet(sb.ToString() + "AND SRVTypeNo1='FWLB-007'").Tables[0]);
                collection.Add(new JsonStringValue("FeeList", fee));
                collection.Add(new JsonStringValue("LateFeeList", lateFee));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "update"));
            collection.Add(new JsonStringValue("flag", flag));
            return(collection.ToString());
        }
コード例 #17
0
        string System.Web.UI.ICallbackEventHandler.GetCallbackResult()
        {
            string         result = "";
            JsonArrayParse jp     = new JsonArrayParse(this._clientArgument);

            if (jp.getValue("Type") == "delete")
            {
                result = deleteaction(jp);
            }
            else if (jp.getValue("Type") == "update")
            {
                result = updateaction(jp);
            }
            else if (jp.getValue("Type") == "submit")
            {
                result = submitaction(jp);
            }
            else if (jp.getValue("Type") == "select")
            {
                result = selectaction(jp);
            }
            else if (jp.getValue("Type") == "newpassword")
            {
                result = newpasswordaction(jp);
            }
            else if (jp.getValue("Type") == "valid")
            {
                result = validaction(jp);
            }
            return(result);
        }
コード例 #18
0
ファイル: Location.cs プロジェクト: luowenyuyu/NewDorllyOrder
        private string deleteaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessLocation bc = new project.Business.Base.BusinessLocation();
                bc.load(jp.getValue("id"));

                if (obj.PopulateDataSet("select 1 from Mstr_Location where ParentLOCNo='" + bc.Entity.LOCNo + "'").Tables[0].Rows.Count > 0)
                {
                    flag = "3";
                }
                else
                {
                    int r = bc.delete();
                    if (r <= 0)
                    {
                        flag = "2";
                    }
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "delete"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList()));

            return(collection.ToString());
        }
コード例 #19
0
        private string deleteaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo();
                bc.load(jp.getValue("id"));
                if (bc.Entity.UserNo.ToUpper() == "ADMIN")
                {
                    flag = "3";
                }
                else
                {
                    int r = bc.delete();
                    if (r <= 0)
                    {
                        flag = "2";
                    }
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "delete"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(string.Empty, jp.getValue("UserNameS"))));

            return(collection.ToString());
        }
コード例 #20
0
        private string updateaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag   = "1";
            string result = "";;

            try
            {
                Business.Base.BusinessAutoAllocation bc = new project.Business.Base.BusinessAutoAllocation();
                bc.load(jp.getValue("id"));

                collection.Add(new JsonStringValue("OrderType", bc.Entity.OrderType));
                collection.Add(new JsonStringValue("RegionNo", bc.Entity.RegionNo));
                collection.Add(new JsonStringValue("DeptNo", bc.Entity.DeptNo));
                collection.Add(new JsonStringValue("UserNo", bc.Entity.UserNo));
                collection.Add(new JsonStringValue("UserName", bc.Entity.UserName));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "update"));
            collection.Add(new JsonStringValue("flag", flag));

            result = collection.ToString();

            return(result);
        }
コード例 #21
0
        private string validaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Sys.BusinessUserInfo bc = new project.Business.Sys.BusinessUserInfo();
                bc.load(jp.getValue("id"));
                bc.Entity.Valid = !bc.Entity.Valid;

                int r = bc.valid();
                if (r <= 0)
                {
                    flag = "2";
                }
                if (bc.Entity.Valid)
                {
                    collection.Add(new JsonStringValue("stat", "<span class=\"label label-success radius\">有效</span>"));
                }
                else
                {
                    collection.Add(new JsonStringValue("stat", "<span class=\"label radius\">已失效</span>"));
                }
                collection.Add(new JsonStringValue("id", jp.getValue("id")));
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("type", "valid"));
            return(collection.ToString());
        }
コード例 #22
0
ファイル: OrderType.cs プロジェクト: luowenyuyu/DorllyOrder
        private string deleteaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessOrderType bc = new project.Business.Base.BusinessOrderType();
                bc.load(jp.getValue("id"));

                //if (obj.PopulateDataSet("select 1 from Mstr_Billboard where OrderType='" + bc.Entity.OrderTypeNo + "'").Tables[0].Rows.Count > 0)
                //{
                //    flag = "3";
                //}
                //else
                //{
                int r = bc.delete();
                if (r <= 0)
                {
                    flag = "2";
                }
                //}
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "delete"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(jp.getValue("OrderTypeNameS"))));

            return(collection.ToString());
        }
コード例 #23
0
        private string submitaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Sys.BusinessUserInfo bu = new project.Business.Sys.BusinessUserInfo();
                bu.load(userid);
                if (bu.Entity.Password == Encrypt.EncryptDES(jp.getValue("oldpwd"), "1"))
                {
                    bu.Entity.Password = Encrypt.EncryptDES(jp.getValue("newpwd"), "1");
                    bu.changepwd();
                }
                else
                {
                    flag = "3";
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "submit"));
            collection.Add(new JsonStringValue("flag", flag));

            return(collection.ToString());
        }
コード例 #24
0
        private string deleteaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessChargeAccount bc = new project.Business.Base.BusinessChargeAccount();
                bc.load(jp.getValue("id"));

                if (obj.PopulateDataSet("select 1 from Mstr_Service where CANo='" + bc.Entity.CANo + "' and SRVSPNo='" + bc.Entity.CASPNo + "'").Tables[0].Rows.Count > 0)
                {
                    flag = "3";
                }
                else
                {
                    int r = bc.delete();
                    if (r <= 0)
                    {
                        flag = "2";
                    }
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "delete"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(jp.getValue("CANoS"), jp.getValue("CANameS"), jp.getValue("CASPNoS"), int.Parse(jp.getValue("page")))));

            return(collection.ToString());
        }
コード例 #25
0
        private string updateaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag   = "1";
            string result = "";;

            try
            {
                Business.Base.BusinessOrderType bc = new project.Business.Base.BusinessOrderType();
                bc.load(jp.getValue("id"), user.Entity.AccID);

                collection.Add(new JsonStringValue("OrderTypeNo", bc.Entity.OrderTypeNo));
                collection.Add(new JsonStringValue("OrderTypeName", bc.Entity.OrderTypeName));
                collection.Add(new JsonStringValue("FlowNo", bc.Entity.FlowNo));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "update"));
            collection.Add(new JsonStringValue("flag", flag));

            result = collection.ToString();

            return(result);
        }
コード例 #26
0
        private string itemdel4action(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag   = "1";
            string result = "";;

            try
            {
                Business.Op.BusinessContractPropertyFee bc = new project.Business.Op.BusinessContractPropertyFee();
                bc.load(jp.getValue("itemid"));
                int r = bc.delete();

                if (r <= 0)
                {
                    flag = "2";
                }
                else
                {
                    // ---- 删除费用明细 ----
                }
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "itemdel4"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createItemList4(jp.getValue("id"), "update")));
            result = collection.ToString();
            return(result);
        }
コード例 #27
0
        private string getvalueaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag    = "1";
            string subtype = "";

            try
            {
                int row = 0;
                Business.Base.BusinessLocation bt = new Business.Base.BusinessLocation();
                foreach (Entity.Base.EntityLocation it in bt.GetListQuery(string.Empty, string.Empty, jp.getValue("parent")))
                {
                    subtype += it.LOCNo + ":" + it.LOCName + ";";
                    row++;
                }

                collection.Add(new JsonNumericValue("row", row));
                collection.Add(new JsonStringValue("subtype", subtype));
                collection.Add(new JsonStringValue("child", jp.getValue("child")));
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "getvalue"));
            collection.Add(new JsonStringValue("flag", flag));

            return(collection.ToString());
        }
コード例 #28
0
        private string getprice4action(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag   = "1";
            string result = "";;

            try
            {
                decimal   UnitPrice = 0;
                DataTable dt        = obj.PopulateDataSet("select top 1 DecimalValue from Sys_Setting where SRVNo='" + jp.getValue("SRVNo") + "'").Tables[0];
                if (dt.Rows.Count > 0)
                {
                    UnitPrice = ParseDecimalForString(dt.Rows[0]["DecimalValue"].ToString());
                }

                collection.Add(new JsonStringValue("UnitPrice", UnitPrice.ToString("0.####")));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "getprice4"));
            collection.Add(new JsonStringValue("flag", flag));
            result = collection.ToString();
            return(result);
        }
コード例 #29
0
        //房屋信息
        private string itemupdate1action(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag   = "1";
            string result = "";;

            try
            {
                Business.Op.BusinessContractRMRentalDetail bc = new Business.Op.BusinessContractRMRentalDetail();
                bc.load(jp.getValue("itemid"));
                collection.Add(new JsonStringValue("RMID", bc.Entity.RMID));
                collection.Add(new JsonStringValue("SRVNo", bc.Entity.SRVNo));
                collection.Add(new JsonStringValue("RMLoc", bc.Entity.RMLoc));
                collection.Add(new JsonStringValue("RMArea", bc.Entity.RMArea.ToString("0.####")));
                collection.Add(new JsonStringValue("RentalUnitPrice", bc.Entity.RentalUnitPrice.ToString("0.####")));
                collection.Add(new JsonStringValue("Remark", bc.Entity.Remark));
                collection.Add(new JsonStringValue("ItemId", jp.getValue("itemid")));
            }
            catch
            { flag = "2"; }

            collection.Add(new JsonStringValue("type", "itemupdate1"));
            collection.Add(new JsonStringValue("flag", flag));
            result = collection.ToString();
            return(result);
        }
コード例 #30
0
        private string reserveaction(JsonArrayParse jp)
        {
            JsonObjectCollection collection = new JsonObjectCollection();
            string flag = "1";

            try
            {
                Business.Base.BusinessConferenceRoom bc = new project.Business.Base.BusinessConferenceRoom();
                bc.load(jp.getValue("id"));
                if (bc.Entity.CRStatus == "free")
                {
                    bc.Entity.CRCurrentCustNo   = jp.getValue("ReserveCust");
                    bc.Entity.CRReservedDate    = GetDate();
                    bc.Entity.CRBegReservedDate = ParseDateForString(jp.getValue("BegReserveDate"));
                    bc.Entity.CREndReservedDate = ParseDateForString(jp.getValue("EndReserveDate"));
                    int r = bc.reserve();
                    if (r <= 0)
                    {
                        flag = "4";
                    }
                }
                else
                {
                    flag = "3";
                }
            }
            catch { flag = "2"; }

            collection.Add(new JsonStringValue("type", "reserve"));
            collection.Add(new JsonStringValue("flag", flag));
            collection.Add(new JsonStringValue("liststr", createList(jp.getValue("CRNoS"), jp.getValue("CRNameS"), jp.getValue("CRAddrS"), jp.getValue("CRStatusS"), ParseIntForString(jp.getValue("page")))));
            return(collection.ToString());
        }