Example #1
0
 //public GenColumn(MyMeta.IColumn column, Zeus.IZeusOutput outputDest, MyMeta.ITable table, Dnp.Utils.Utils dnp)
 public GenColumn(MyMeta.IColumn column, MyMeta.ITable table, RequestContext context)
 {
     m_IColumn = column;
     script = ScriptSettings.GetInstance();
     output = context.Zeus.Output;
     _util = new CommonUtility();
     _table = table;
     m_DnpUtils = context.ScriptSettings.DnpUtils;
 }
Example #2
0
        public void Fill(SqlDataReader reader)
        {
            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWSubjectId"))
            {
                this.anwSubjectId = Convert.ToString(reader["ANWSubjectId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SubjectName"))
            {
                this.subjectName = Convert.ToString(reader["SubjectName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseSubjectID"))
            {
                this.spouseSubjectId = Convert.ToString(reader["SpouseSubjectID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseName"))
            {
                this.spouseName = Convert.ToString(reader["SpouseName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "RCHID"))
            {
                this.rchId = Convert.ToString(reader["RCHID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ContactNo"))
            {
                this.contactNo = Convert.ToString(reader["ContactNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ECNumber"))
            {
                this.ecNumber = Convert.ToString(reader["ECNumber"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "LMPDate"))
            {
                this.lmpDate = Convert.ToString(reader["LMPDate"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "GestationalAge"))
            {
                this.ga = Convert.ToDecimal(reader["GestationalAge"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ObstetricScore"))
            {
                this.obstetricScore = Convert.ToString(reader["ObstetricScore"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Age"))
            {
                this.age = Convert.ToInt32(reader["Age"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWCBCResult"))
            {
                this.anwCBCTestResult = Convert.ToString(reader["ANWCBCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWSSTResult"))
            {
                this.anwSSTestResult = Convert.ToString(reader["ANWSSTResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWHPLCResult"))
            {
                this.anwHPLCTestResult = Convert.ToString(reader["ANWHPLCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseCBCResult"))
            {
                this.spouseCBCTestResult = Convert.ToString(reader["SpouseCBCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseSSTResult"))
            {
                this.spouseSSTestResult = Convert.ToString(reader["SpouseSSTResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseHPLCResult"))
            {
                this.spouseHPLCTestResult = Convert.ToString(reader["SpouseHPLCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CounsellingId"))
            {
                this.prePNDTCounsellingId = Convert.ToInt32(reader["CounsellingId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CounsellorId"))
            {
                this.counsellorId = Convert.ToInt32(reader["CounsellorId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CounsellingDateTime"))
            {
                this.counsellingDateTime = Convert.ToString(reader["CounsellingDateTime"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SchedulingId"))
            {
                this.schedulingId = Convert.ToInt32(reader["SchedulingId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CounsellorName"))
            {
                this.counsellorName = Convert.ToString(reader["CounsellorName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "AssignedObstetricianId"))
            {
                this.obstetricianId = Convert.ToInt32(reader["AssignedObstetricianId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ObsetricianName"))
            {
                this.obstetricianName = Convert.ToString(reader["ObsetricianName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SchedulePNDTDate"))
            {
                this.schedulePNDTDate = Convert.ToString(reader["SchedulePNDTDate"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SchedulePNDTTime"))
            {
                this.schedulePNDTTime = Convert.ToString(reader["SchedulePNDTTime"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CounsellingRemarks"))
            {
                this.counsellingRemarks = Convert.ToString(reader["CounsellingRemarks"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "FileName"))
            {
                this.fileName = Convert.ToString(reader["FileName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "FileLocation"))
            {
                this.fileLocation = Convert.ToString(reader["FileLocation"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "IsPNDTAgreeYes"))
            {
                this.isPNDTAgreeYes = Convert.ToBoolean(reader["IsPNDTAgreeYes"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "IsPNDTAgreeNo"))
            {
                this.isPNDTAgreeNo = Convert.ToBoolean(reader["IsPNDTAgreeNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "IsPNDTAgreePending"))
            {
                this.isPNDTAgreePending = Convert.ToBoolean(reader["IsPNDTAgreePending"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseAge"))
            {
                this.spouseAge = Convert.ToInt32(reader["SpouseAge"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_MCV"))
            {
                this.anwMCV = Convert.ToString(reader["ANW_MCV"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_RDW"))
            {
                this.anwRDW = Convert.ToString(reader["ANW_RDW"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_RBC"))
            {
                this.anwRBC = Convert.ToString(reader["ANW_RBC"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbA0"))
            {
                this.anwHbA0 = Convert.ToString(reader["ANW_HbA0"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbA2"))
            {
                this.anwHbA2 = Convert.ToString(reader["ANW_HbA2"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbF"))
            {
                this.anwHbF = Convert.ToString(reader["ANW_HbF"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbD"))
            {
                this.anwHbD = Convert.ToString(reader["ANW_HbD"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbS"))
            {
                this.anwHbS = Convert.ToString(reader["ANW_HbS"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_MCV"))
            {
                this.spouseMCV = Convert.ToString(reader["Spouse_MCV"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_RDW"))
            {
                this.spouseRDW = Convert.ToString(reader["Spouse_RDW"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_RBC"))
            {
                this.spouseRBC = Convert.ToString(reader["Spouse_RBC"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbA0"))
            {
                this.spouseHbA0 = Convert.ToString(reader["Spouse_HbA0"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbA2"))
            {
                this.spouseHbA2 = Convert.ToString(reader["Spouse_HbA2"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbF"))
            {
                this.spouseHbF = Convert.ToString(reader["Spouse_HbF"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbS"))
            {
                this.spouseHbS = Convert.ToString(reader["Spouse_HbS"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbD"))
            {
                this.spouseHbD = Convert.ToString(reader["Spouse_HbD"]);
            }
        }
Example #3
0
    public UserAuthenStyleUploadResult UserAuthenStyleUpload(string ProvinceID, string ID,
                                                             string AreaID, AuthenRecord[] AuthenRecords, string ExtendField)
    {
        UserAuthenStyleUploadResult Result = new UserAuthenStyleUploadResult();

        Result.Result           = ErrorDefinition.IError_Result_UnknowError_Code;
        Result.ErrorDescription = "";
        Result.ID          = ID;
        Result.ExtendField = "";
        Result.CustID      = "";
        //string strXML = "";
        string SPID = "";



        try
        {
            #region 数据校验

            if (CommonUtility.IsEmpty(ProvinceID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = "ProvinceID不能为空";
                return(Result);
            }


            if (CommonUtility.IsEmpty(AreaID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidAreaCode_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidAreaCode_Msg + ",AreaID不能为空";
                return(Result);
            }



            if (CommonUtility.IsEmpty(ID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidCustID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidCustID_Msg + ",不能为空";
                return(Result);
            }

            if (!CommonUtility.IsEmpty(ExtendField))
            {
                SPID = CommonBizRules.GetValueFromXmlStr(ExtendField, "SPID");
            }
            #endregion


            Result.Result = BTForCrmBizRules.UserAuthenStyleUpload(ProvinceID, ID, AreaID, ExtendField, AuthenRecords, SPID, out Result.CustID, out Result.ErrorDescription);
        }
        catch (Exception ex)
        {
            Result.Result           = ErrorDefinition.IError_Result_System_UnknowError_Code;
            Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + "," + ex.Message;
        }
        finally
        {
            #region WriteLog
            StringBuilder msg = new StringBuilder();
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n");
            msg.Append("Crm客户认证信息同步接口 " + DateTime.Now.ToString("u") + "\r\n");
            msg.Append(";ProvinceID - " + ProvinceID);
            msg.Append(";ID - " + ID);
            msg.Append(";AreaID - " + AreaID);

            if (AuthenRecords != null)
            {
                if (AuthenRecords.Length > 0)
                {
                    for (int i = 0; i < AuthenRecords.Length; i++)
                    {
                        msg.Append(";AuthenType - " + AuthenRecords[i].AuthenType);
                        msg.Append(";AuthenName - " + AuthenRecords[i].AuthenName);
                    }
                }
            }
            msg.Append(";ExtendField - " + ExtendField);
            msg.Append("\r\n");
            msg.Append("处理结果 - " + Result.Result);
            msg.Append("; 错误描述 - " + Result.ErrorDescription);
            msg.Append("; CustID - " + Result.CustID);
            msg.Append("; ID - " + Result.ID);
            msg.Append("; ErrorDescription - " + Result.ErrorDescription);
            msg.Append("; ExtendField - " + Result.ExtendField + "\r\n");
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n");

            BTUCenterInterfaceLog.CenterForCRM("UserAuthenStyleUpload", msg);
            #endregion
        }

        return(Result);
    }
Example #4
0
    // [WebMethod(Description = "漫游密码认证接口")]
    public RoamAuthResult RoamAuth(string SystemsID, string AuthenName, string AuthenType, string Password, string ExtendField)
    {
        RoamAuthResult Result = new RoamAuthResult();

        Result.Result           = ErrorDefinition.IError_Result_UnknowError_Code;
        Result.ErrorDescription = "";
        Result.ExtendField      = "";
        Result.CustType         = "";

        string ProvinceID = "";

        try
        {
            #region 数据校验
            if (CommonUtility.IsEmpty(SystemsID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidSPID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidSPID_Msg + ",不能为空";
                return(Result);
            }

            if (SystemsID.Length != ConstDefinition.Length_SYSID)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidSPID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidSYSID_Msg + ",长度有误";
                return(Result);
            }


            if (CommonUtility.IsEmpty(AuthenName))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidRealName_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidRealName_Msg + ",不能为空";
                return(Result);
            }

            if (CommonUtility.IsEmpty(AuthenType))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",不能为空";
                return(Result);
            }

            //if (Span_AuthenType)
            //{

            //    Result.Result = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
            //    Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",不能为空";
            //    return Result;
            //}

            if (CommonUtility.IsEmpty(Password))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidPassword_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidPassword_Msg + ",不能为空";
                return(Result);
            }

            #endregion

            //string CustType = "";
            //Result.Result = BTForBusinessSystemInterfaceRules.UserAuthV2(SystemsID, AuthenName, AuthenType, Password, this.Context,
            //    out Result.ErrorDescription, out Result.CustID, out Result.UserAccount, out Result.CustType,out outerid, out ProvinceID);
        }
        catch (Exception e)
        {
            Result.Result           = ErrorDefinition.IError_Result_System_UnknowError_Code;
            Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + e.Message;
        }
        finally
        {
            #region WriteLog
            StringBuilder msg = new StringBuilder();
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n");
            msg.Append("漫游认证接口 " + DateTime.Now.ToString("u") + "\r\n");
            msg.Append(";SystemsID - " + SystemsID);
            msg.Append(";AuthenName - " + AuthenName);
            msg.Append(";AuthenType - " + AuthenType);
            msg.Append(";Password - " + Password);
            msg.Append("\r\n");

            msg.Append("处理结果 - " + Result.Result);
            msg.Append("; 错误描述 - " + Result.ErrorDescription);
            msg.Append("; CustID - " + Result.CustID);
            msg.Append("; UserAccount - " + Result.UserAccount);
            msg.Append("; ExtendField - " + Result.ExtendField + "\r\n");
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n");

            BTUCenterInterfaceLog.CenterForBizTourLog("UserAuthV2", msg);
            #endregion

            //写数据库日志
            try
            {
                CommonBizRules.WriteDataLog(SystemsID, AuthenName, AuthenType, Result.Result,
                                            Result.ErrorDescription, "", "UserAuthV2");
            }
            catch { }
        }
        return(Result);
    }
Example #5
0
    public CustInfoUploadResult CustInfoUpload(string ProvinceID, string ID, string CustType, string CustAccount, string CustLevel,
                                               string RealName, string ContactTel, string Address, string ZipCode, string CertificateCode,
                                               string CertificateType, string AreaID, string Sex, string Email, string dealType, AuthenRecord[] AuthenRecords, string ExtendField)
    {
        CustInfoUploadResult Result = new CustInfoUploadResult();
        string SPID = "";

        Result.Result           = ErrorDefinition.IError_Result_UnknowError_Code;
        Result.ErrorDescription = "";
        Result.ID          = ID;
        Result.ExtendField = "";
        Result.CustID      = "";
        string strXML = "";



        try
        {
            #region 数据校验

            if (CommonUtility.IsEmpty(ProvinceID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = "ProvinceID不能为空";
                return(Result);
            }


            if (CommonUtility.IsEmpty(CustType))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidUserType_Code;
                Result.ErrorDescription = "CUstType不能为空";
                return(Result);
            }


            if (CommonUtility.IsEmpty(CustLevel))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidCustLevel_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidCustLevel_Msg + ",不能为空";
                return(Result);
            }
            if (CustType.Length != 2)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidUserType_Code;
                Result.ErrorDescription = "CustType无效,长度不为2";
                return(Result);
            }

            if (CommonUtility.IsEmpty(RealName))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidPassword_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidRealName_Msg + ",不能为空";
                return(Result);
            }


            if (!CommonUtility.IsEmpty(ExtendField))
            {
                SPID = CommonBizRules.GetValueFromXmlStr(ExtendField, "SPID");
            }

            switch (CustType)
            {
            case "01":
                CustType = "14";
                break;

            case "02":
                CustType = "20";
                break;

            case "03":
                CustType = "12";
                break;

            case "09":
                CustType = "90";
                break;

            case "11":
                CustType = "30";
                break;

            case "00":
                CustType = "42";
                break;
            }


            Result.Result = BTForCrmBizRules.CustInfoUpload(ProvinceID, ID, CustType, CustAccount, CustLevel,
                                                            RealName, ContactTel, Address, ZipCode, CertificateCode,
                                                            CertificateType, AreaID, Sex, Email, dealType, ExtendField, AuthenRecords, SPID, out Result.CustID, out Result.ErrorDescription);

            if (Result.Result == 0)
            {
                //通知积分系统
                CIP2BizRules.InsertCustInfoNotify(Result.CustID, "2", System.Configuration.ConfigurationManager.AppSettings["ScoreBesttoneSPID"], "", dealType, out Result.ErrorDescription);
            }
            strXML = BTBizRules.GenerateResultXml(Result.Result.ToString(), Result.ErrorDescription);
            #endregion
        }
        catch (Exception ex)
        {
            Result.Result           = ErrorDefinition.IError_Result_System_UnknowError_Code;
            Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + "," + ex.Message;
        }
        finally
        {
            #region WriteLog
            StringBuilder msg = new StringBuilder();
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n");
            msg.Append("Crm客户同步接口 " + DateTime.Now.ToString("u") + "\r\n");
            msg.Append(";ProvinceID - " + ProvinceID);
            msg.Append(";ID - " + ID);
            msg.Append(";CustType - " + CustType);
            msg.Append(";CustAccount - " + CustAccount);
            msg.Append(";CustLevel - " + CustLevel);
            msg.Append(";RealName - " + RealName);
            msg.Append(";ContactTel - " + ContactTel);
            msg.Append(";Address - " + Address);
            msg.Append(";ZipCode - " + ZipCode);
            msg.Append(";CertificateCode - " + CertificateCode);
            msg.Append(";CertificateType - " + CertificateType);
            msg.Append(";AreaID - " + AreaID);
            msg.Append(";Sex - " + Sex);
            msg.Append(";Email - " + Email);
            msg.Append(";dealType - " + dealType);
            msg.Append(";ExtendField - " + ExtendField);
            msg.Append(";strXML - " + strXML);

            if (AuthenRecords != null)
            {
                if (AuthenRecords.Length > 0)
                {
                    for (int i = 0; i < AuthenRecords.Length; i++)
                    {
                        msg.Append(";AuthenType - " + AuthenRecords[i].AuthenType);
                        msg.Append(";AuthenName - " + AuthenRecords[i].AuthenName);
                    }
                }
            }
            msg.Append(";ExtendField - " + ExtendField);
            msg.Append("\r\n");
            msg.Append("处理结果 - " + Result.Result);
            msg.Append("; 错误描述 - " + Result.ErrorDescription);
            msg.Append("; CustID - " + Result.CustID);
            msg.Append("; ID - " + Result.ID);
            msg.Append("; ErrorDescription - " + Result.ErrorDescription);
            msg.Append("; ExtendField - " + Result.ExtendField + "\r\n");
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n");

            BTUCenterInterfaceLog.CenterForCRM("CustInfoUpload", msg);
            #endregion
        }

        return(Result);
    }
Example #6
0
        /// <summary>
        /// 数据保存/提交 方法
        /// </summary>
        /// <param name="HandleTypeName">保存/提交</param>
        private void SaveOrSubmitMethod(string HandleTypeName)
        {
            try
            {
                if (CheckListInfo())
                {
                    gvPartsMsgList.EndEdit();
                    string opName = "其它发货单操作";
                    lblorder_num.Text = CommonUtility.GetNewNo(DataSources.EnumProjectType.ShippingBill);//获取其它发货单编号
                    if (HandleTypeName == submit)
                    {
                        txtorder_status_name.Caption = DataSources.GetDescription(DataSources.EnumAuditStatus.SUBMIT, true);
                    }
                    else if (HandleTypeName == save)
                    {
                        txtorder_status_name.Caption = DataSources.GetDescription(DataSources.EnumAuditStatus.DRAFT, true);
                    }

                    List <SysSQLString> listSql = new List <SysSQLString>();
                    if (status == WindowStatus.Add || status == WindowStatus.Copy)
                    {
                        StockShippingId = Guid.NewGuid().ToString();
                        AddShippingBillSql(listSql, ShippingBillEntity, StockShippingId, HandleTypeName);
                        opName = "新增其它发货单";
                        AddOrEditPartsListMsg(listSql, StockShippingId, WindowStatus.Add);
                    }
                    else if (status == WindowStatus.Edit)
                    {
                        EditReceiptBillSql(listSql, ShippingBillEntity, StockShippingId, HandleTypeName);
                        opName = "修改其它发货单";

                        AddOrEditPartsListMsg(listSql, StockShippingId, WindowStatus.Edit);
                    }


                    if (DBHelper.BatchExeSQLStringMultiByTrans(opName, listSql))
                    {
                        if (HandleTypeName == submit)
                        {
                            MessageBoxEx.Show("提交成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                        else if (HandleTypeName == save)
                        {
                            MessageBoxEx.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }

                        long   StartDate    = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DateTime.Now.AddMonths(-6).ToShortDateString())); //获取当前日期的半年前的日期
                        long   EndDate      = Common.LocalDateTimeToUtcLong(Convert.ToDateTime(DateTime.Now.ToShortDateString()));               //获取当前日期
                        string DefaultWhere = " enable_flag=1 and ShpBillTb.order_date between  " + StartDate + " and " + EndDate;               //默认查询条件
                        UCShippingBM.GetShippingBillList(DefaultWhere);                                                                          //更新单据列表
                        deleteMenuByTag(this.Tag.ToString(), UCShippingBM.Name);
                    }
                    else
                    {
                        if (HandleTypeName == submit)
                        {
                            MessageBoxEx.Show("提交失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                        else if (HandleTypeName == save)
                        {
                            MessageBoxEx.Show("保存失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        }
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message, "异常提示", MessageBoxButtons.OK, MessageBoxIcon.Question);
            }
        }
        /// <summary>
        /// Gets the snapshot timestamp from the response.
        /// </summary>
        /// <param name="response">The web response.</param>
        /// <returns>The snapshot timestamp.</returns>
        public static string GetSnapshotTime(HttpWebResponse response)
        {
            CommonUtility.AssertNotNull("response", response);

            return response.Headers[Constants.HeaderConstants.SnapshotHeader];
        }
Example #8
0
        public void Fill(SqlDataReader reader)
        {
            if (CommonUtility.IsColumnExistsAndNotNull(reader, "DistrictId"))
            {
                this.districtId = Convert.ToInt32(reader["DistrictId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "DistrictName"))
            {
                this.districtName = Convert.ToString(reader["DistrictName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "StateName"))
            {
                this.stateName = Convert.ToString(reader["StateName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "DateofRegistration"))
            {
                this.dateofRegistration = Convert.ToString(reader["DateofRegistration"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherSubjectId"))
            {
                this.motherSubjectId = Convert.ToString(reader["MotherSubjectId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HospitalNo"))
            {
                this.hospitalNo = Convert.ToString(reader["HospitalNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherFirstName"))
            {
                this.motherFirstName = Convert.ToString(reader["MotherFirstName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherLastName"))
            {
                this.motherLastName = Convert.ToString(reader["MotherLastName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "DOB"))
            {
                this.dob = Convert.ToString(reader["DOB"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Age"))
            {
                this.age = Convert.ToInt32(reader["Age"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherGovIdTypeId"))
            {
                this.motherGovIdTypeId = Convert.ToInt32(reader["MotherGovIdTypeId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherGovIdDetail"))
            {
                this.motherGovIdDetail = Convert.ToString(reader["MotherGovIdDetail"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherContactNo"))
            {
                this.motherContactNo = Convert.ToString(reader["MotherContactNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "RCHID"))
            {
                this.rchId = Convert.ToString(reader["RCHID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "G"))
            {
                this.g = Convert.ToInt32(reader["G"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "P"))
            {
                this.p = Convert.ToInt32(reader["P"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "L"))
            {
                this.l = Convert.ToInt32(reader["L"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "A"))
            {
                this.a = Convert.ToInt32(reader["A"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ECNumber"))
            {
                this.ecNumber = Convert.ToString(reader["ECNumber"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Address1"))
            {
                this.address1 = Convert.ToString(reader["Address1"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Address2"))
            {
                this.address2 = Convert.ToString(reader["Address2"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Address3"))
            {
                this.address3 = Convert.ToString(reader["Address3"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "StateId"))
            {
                this.stateId = Convert.ToInt32(reader["StateId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Pincode"))
            {
                this.pincode = Convert.ToString(reader["Pincode"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "FatherFirstName"))
            {
                this.fatherFirstName = Convert.ToString(reader["FatherFirstName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "FatherLastName"))
            {
                this.fatherLastName = Convert.ToString(reader["FatherLastName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "FatherContactNo"))
            {
                this.fatherContactNo = Convert.ToString(reader["FatherContactNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "GuardianFirstName"))
            {
                this.guardianFirstName = Convert.ToString(reader["GuardianFirstName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "GuardianLastName"))
            {
                this.guardianLastName = Convert.ToString(reader["GuardianLastName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "GuardianContactNo"))
            {
                this.guardianContactNo = Convert.ToString(reader["GuardianContactNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherHospitalContactNo"))
            {
                this.motherHospitalContactNo = Convert.ToString(reader["MotherHospitalContactNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherHospitalName"))
            {
                this.motherHospitalName = Convert.ToString(reader["MotherHospitalName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MotherHospitalAddress"))
            {
                this.motherHospitalAddress = Convert.ToString(reader["MotherHospitalAddress"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "GPLA"))
            {
                this.gpla = Convert.ToString(reader["GPLA"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CommunityName"))
            {
                this.communityName = Convert.ToString(reader["CommunityName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CasteName"))
            {
                this.casteName = Convert.ToString(reader["CasteName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ReligionName"))
            {
                this.religionName = Convert.ToString(reader["ReligionName"]);
            }
        }
        internal IAsyncOperation <TableResult> ExecuteAsync(CloudTableClient client, string tableName, TableRequestOptions requestOptions, OperationContext operationContext)
#endif
        {
            TableRequestOptions modifiedOptions = TableRequestOptions.ApplyDefaults(requestOptions, client);

            operationContext = operationContext ?? new OperationContext();

            CommonUtility.AssertNotNullOrEmpty("tableName", tableName);
            RESTCommand <TableResult> cmdToExecute = null;

            if (this.OperationType == TableOperationType.Insert ||
                this.OperationType == TableOperationType.InsertOrMerge ||
                this.OperationType == TableOperationType.InsertOrReplace)
            {
                if (!this.isTableEntity && this.OperationType != TableOperationType.Insert)
                {
                    CommonUtility.AssertNotNull("Upserts require a valid PartitionKey", this.Entity.PartitionKey);
                    CommonUtility.AssertNotNull("Upserts require a valid RowKey", this.Entity.RowKey);
                }

                cmdToExecute = InsertImpl(this, client, tableName, modifiedOptions);
            }
            else if (this.OperationType == TableOperationType.Delete)
            {
                if (!this.isTableEntity)
                {
                    CommonUtility.AssertNotNullOrEmpty("Delete requires a valid ETag", this.Entity.ETag);
                    CommonUtility.AssertNotNull("Delete requires a valid PartitionKey", this.Entity.PartitionKey);
                    CommonUtility.AssertNotNull("Delete requires a valid RowKey", this.Entity.RowKey);
                }

                cmdToExecute = DeleteImpl(this, client, tableName, modifiedOptions);
            }
            else if (this.OperationType == TableOperationType.Merge)
            {
                CommonUtility.AssertNotNullOrEmpty("Merge requires a valid ETag", this.Entity.ETag);
                CommonUtility.AssertNotNull("Merge requires a valid PartitionKey", this.Entity.PartitionKey);
                CommonUtility.AssertNotNull("Merge requires a valid RowKey", this.Entity.RowKey);

                cmdToExecute = MergeImpl(this, client, tableName, modifiedOptions);
            }
            else if (this.OperationType == TableOperationType.Replace)
            {
                CommonUtility.AssertNotNullOrEmpty("Replace requires a valid ETag", this.Entity.ETag);
                CommonUtility.AssertNotNull("Replace requires a valid PartitionKey", this.Entity.PartitionKey);
                CommonUtility.AssertNotNull("Replace requires a valid RowKey", this.Entity.RowKey);

                cmdToExecute = ReplaceImpl(this, client, tableName, modifiedOptions);
            }
            else if (this.OperationType == TableOperationType.Retrieve)
            {
                cmdToExecute = RetrieveImpl(this, client, tableName, modifiedOptions);
            }
            else
            {
                throw new NotSupportedException();
            }

#if ASPNET_K || PORTABLE
            return(Task.Run(() => Executor.ExecuteAsync(
                                cmdToExecute,
                                modifiedOptions.RetryPolicy,
                                operationContext,
                                cancellationToken), cancellationToken));
#else
            return(AsyncInfo.Run((cancellationToken) => Executor.ExecuteAsync(
                                     cmdToExecute,
                                     modifiedOptions.RetryPolicy,
                                     operationContext,
                                     cancellationToken)));
#endif
        }
        /// <summary>
        /// Writes Table service properties to a stream, formatted in XML.
        /// </summary>
        /// <param name="properties">A <see cref="ServiceProperties"/> object containing the service properties to format and write to the stream.</param>
        /// <param name="outputStream">The <see cref="System.IO.Stream"/> object to which the formatted properties are to be written.</param>
        public static void WriteServiceProperties(ServiceProperties properties, Stream outputStream)
        {
            CommonUtility.AssertNotNull("properties", properties);

            properties.WriteServiceProperties(outputStream);
        }
Example #11
0
 /// <summary>
 /// Generates a property filter condition string for the <see cref="Guid"/> value.
 /// </summary>
 /// <param name="propertyName">A string containing the name of the property to compare.</param>
 /// <param name="operation">A string containing the comparison operator to use.</param>
 /// <param name="value">A <see cref="Guid"/> containing the value to compare with the property.</param>
 /// <returns>A string containing the formatted filter condition.</returns>
 public static string GenerateFilterConditionForGuid(string propertyName, string operation, Guid value)
 {
     CommonUtility.AssertNotNull("value", value);
     return(GenerateFilterCondition(propertyName, operation, value.ToString(), EdmType.Guid));
 }
Example #12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    #region IsPostBack

                    CommonUtility.getDDLData(ddlOperator, "Operator_Name", "Operator_ID", "Eticket_MST_Operators", "IsActive", "1");
                    ddlOperator.Items.Insert(0, new ListItem("Select Operator", "-1"));
                    ddl_bus.Items.Insert(0, new ListItem("Select Operator", "-1"));


                    //CommonUtility.getDDLData(ddl_source, "Location_Name", "Location_ID", "Eticket_MST_Location", "IsActive", "1");
                    //CommonUtility.getDDLData(ddl_destin, "Location_Name", "Location_ID", "Eticket_MST_Location", "IsActive", "1");

                    ddl_source.Items.Insert(0, new ListItem("Select Source", "-1"));
                    ddl_destin.Items.Insert(0, new ListItem("Select Destination", "-1"));
                    //funcBindLocation();

                    #endregion

                    //grd.Visible = false;
                    //passArea.Visible = false;
                    //controw.Visible = false;



                    lbl_bookingDate.Text = System.DateTime.Now.ToString("dd MMM yyyy");


                    try
                    {
                        grd_fare_breakup.DataSource = null;
                        grd_fare_breakup.DataBind();
                        txt_ind_fare.Text    = string.Empty;
                        txt_ind_male_no.Text = string.Empty;
                        hid_fare.Value       = string.Empty;
                        //grd.Visible = false;
                        //passArea.Visible = false;
                        //controw.Visible = false;

                        grd.Visible      = true;
                        passArea.Visible = true;
                        controw.Visible  = true;
                    }

                    catch (Exception ex)
                    {
                        lbl_msg.Visible  = true;
                        lbl_msg.Text     = ex.ToString();
                        lbl_msg.CssClass = "general";
                    }
                }
            }

            catch (Exception ex)
            {
                lbl_msg.Visible  = true;
                lbl_msg.Text     = ex.ToString();
                lbl_msg.CssClass = "general";
            }
        }
 public Organization GetCurrentOrganization()
 {
     return(CommonUtility.GetCurrentOrganization());
 }
Example #14
0
        public void Fill(SqlDataReader reader)
        {
            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SampleDamaged"))
            {
                this.sampleDamaged = Convert.ToBoolean(reader["SampleDamaged"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "RBC"))
            {
                this.rbc = Convert.ToString(reader["RBC"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SubjectName"))
            {
                this.subjectName = Convert.ToString(reader["SubjectName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SubjectType"))
            {
                this.subjectType = Convert.ToString(reader["SubjectType"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "UniqueSubjectID"))
            {
                this.uniqueSubjectId = Convert.ToString(reader["UniqueSubjectID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "RCHID"))
            {
                this.rchId = Convert.ToString(reader["RCHID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ContactNo"))
            {
                this.contactNo = Convert.ToString(reader["ContactNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ECNumber"))
            {
                this.ecNumber = Convert.ToString(reader["ECNumber"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "LMPDate"))
            {
                this.lmpDate = Convert.ToString(reader["LMPDate"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "GestationalAge"))
            {
                this.ga = Convert.ToString(reader["GestationalAge"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ObstetricScore"))
            {
                this.obstetricScore = Convert.ToString(reader["ObstetricScore"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Age"))
            {
                this.age = Convert.ToString(reader["Age"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Gender"))
            {
                this.gender = Convert.ToString(reader["Gender"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "DOB"))
            {
                this.dob = Convert.ToString(reader["DOB"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "BarcodeNo"))
            {
                this.barcodeNo = Convert.ToString(reader["BarcodeNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Districtname"))
            {
                this.district = Convert.ToString(reader["Districtname"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CBCResult"))
            {
                this.cbcResult = Convert.ToString(reader["CBCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "MCV"))
            {
                this.mcv = Convert.ToString(reader["MCV"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "RDW"))
            {
                this.rdw = Convert.ToString(reader["RDW"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SSTResult"))
            {
                this.sstResult = Convert.ToString(reader["SSTResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HPLCTestResult"))
            {
                this.hplcResult = Convert.ToString(reader["HPLCTestResult"]);
            }


            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HbA0"))
            {
                this.hbA0 = Convert.ToString(reader["HbA0"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HbA2"))
            {
                this.hbA2 = Convert.ToString(reader["HbA2"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HbC"))
            {
                this.hbC = Convert.ToString(reader["HbC"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HbD"))
            {
                this.hbD = Convert.ToString(reader["HbD"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HbF"))
            {
                this.hbF = Convert.ToString(reader["HbF"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HbS"))
            {
                this.hbS = Convert.ToString(reader["HbS"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "HPLCDiagnosis"))
            {
                this.hplcDiagnosis = Convert.ToString(reader["HPLCDiagnosis"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseSubjectID"))
            {
                this.spouseSubjectId = Convert.ToString(reader["SpouseSubjectID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseName"))
            {
                this.spouseName = Convert.ToString(reader["SpouseName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseCBCResult"))
            {
                this.spouseCBCTestResult = Convert.ToString(reader["SpouseCBCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseSSTResult"))
            {
                this.spouseSSTestResult = Convert.ToString(reader["SpouseSSTResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseHPLCResult"))
            {
                this.spouseHPLCTestResult = Convert.ToString(reader["SpouseHPLCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_MCV"))
            {
                this.spouseMCV = Convert.ToString(reader["Spouse_MCV"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_RDW"))
            {
                this.spouseRDW = Convert.ToString(reader["Spouse_RDW"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_RBC"))
            {
                this.spouseRBC = Convert.ToString(reader["Spouse_RBC"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbA0"))
            {
                this.spouseHbA0 = Convert.ToString(reader["Spouse_HbA0"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbA2"))
            {
                this.spouseHbA2 = Convert.ToString(reader["Spouse_HbA2"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbF"))
            {
                this.spouseHbF = Convert.ToString(reader["Spouse_HbF"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbS"))
            {
                this.spouseHbS = Convert.ToString(reader["Spouse_HbS"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbD"))
            {
                this.spouseHbD = Convert.ToString(reader["Spouse_HbD"]);
            }
        }
 /// <summary>
 /// This renders short properties with DataAnnotations Attributes.
 /// </summary>
 /// <param name="column"></param>
 /// <param name="context"></param>
 /// <example>
 /// [Required(ErrorMessage = "Category Name is required.")]
 /// [StringLength(50, ErrorMessage = "Category Name must be between 1 and 50 characters.")]
 /// [DisplayName("Category Name")]
 /// public string CategoryName { get; set; }
 /// </example>
 public BusinessObjectsPropertyRenderDataAnnotations(MyMeta.IColumn column, RequestContext context)
     : base(column, context)
 {
     this._util = context.Utility;
 }
Example #16
0
    protected void btn_OK_Click(object sender, EventArgs e)
    {
        if (CommonBizRules.IsUrlParams(HttpContext.Current.Request.Url.OriginalString))
        {
            SPID      = HttpUtility.HtmlDecode(Request.QueryString["SPID"].ToString());
            ReturnUrl = HttpUtility.HtmlDecode(Request.QueryString["ReturnUrl"].ToString());
        }

        if (!CommonUtility.ValidateValidateCode(HttpUtility.HtmlDecode(Request.Form["code"].ToString().Trim().ToUpper()), this.Context))
        {
            err_code.InnerHtml = "验证码错误,请重新输入";
            return;
        }
        //TokenValidate.IsRedircet = false;
        TokenValidate.Validate();
        CustID = TokenValidate.CustID;

        OldPwd    = Request.Form["oldPasswd"].ToString().Trim();
        VerifyPwd = Request.Form["verifyPasswd"].ToString().Trim();

        //语言密码为空
        if (PassWordBO.VoicePwdIsNull(CustID, out ErrMsg))
        {
            Label1.Text = "输入登录密码";
            if (!PassWordBO.OldPwdIsRight(CustID, OldPwd, "2", out ErrMsg))
            {
                //CommonBizRules.ErrorHappenedRedircet(-1, ErrMsg, "修改语音密码", this.Context);
                err_code.InnerHtml = "";
                error.InnerHtml    = "原始密码错误";
                return;
            }
            else
            {
                string ErrMsgSetPwd = "";
                int    Result       = PassWordBO.SetPassword(SPID, CustID, VerifyPwd, "1", "", out ErrMsgSetPwd);
                if (Result != 0)
                {
                    CommonBizRules.ErrorHappenedRedircet(Result, ErrMsgSetPwd, "修改语音密码", this.Context);
                }
                CommonBizRules.SuccessRedirect(ReturnUrl, "修改语音密码成功", this.Context);
            }
        }
        else
        {
            if (!PassWordBO.OldPwdIsRight(CustID, OldPwd, "1", out ErrMsg))
            {
                //CommonBizRules.ErrorHappenedRedircet(-1, ErrMsg, "修改语音密码", this.Context);
                error.InnerHtml = "原始密码错误";
                return;
            }
            else
            {
                string ErrMsgSetPwd = "";
                int    Result       = PassWordBO.SetPassword(SPID, CustID, VerifyPwd, "1", "", out ErrMsgSetPwd);
                if (Result != 0)
                {
                    CommonBizRules.ErrorHappenedRedircet(Result, ErrMsgSetPwd, "修改语音密码", this.Context);
                }
                CommonBizRules.SuccessRedirect(ReturnUrl, "修改语音密码成功", this.Context);
            }
        }
    }
 public BusinessObjectsPropertyRenderEntLibValidation(MyMeta.IColumn column, RequestContext context)
     : base(column, context)
 {
     this._util = context.Utility;
 }
Example #18
0
 public ChangeXAxisPopup()
 {
     InitializeComponent();
     this._ComUtil = new CommonUtility();
     InitializeLayout();
 }
        /// <summary>
        /// Extracts the lease ID header from a web response.
        /// </summary>
        /// <param name="response">The web response.</param>
        /// <returns>The lease ID.</returns>
        public static string GetLeaseId(HttpWebResponse response)
        {
            CommonUtility.AssertNotNull("response", response);

            return response.Headers[Constants.HeaderConstants.LeaseIdHeader];
        }
Example #20
0
        /// <summary>
        /// lấy connection
        /// </summary>
        /// <param name="appCode"></param>
        /// <returns></returns>
        public IDbConnection GetConnection(string appCode)
        {
            var connString = CommonUtility.GetConnectionString();

            return(new MySqlConnection(connString));
        }
        /// <summary>
        /// Gets the blob's properties from the response.
        /// </summary>
        /// <param name="response">The web response.</param>
        /// <returns>The blob's properties.</returns>
        public static BlobProperties GetProperties(HttpWebResponse response)
        {
            CommonUtility.AssertNotNull("response", response);

            BlobProperties properties = new BlobProperties();
            properties.ETag = HttpResponseParsers.GetETag(response);

#if WINDOWS_PHONE 
            properties.LastModified = HttpResponseParsers.GetLastModified(response);
            properties.ContentLanguage = response.Headers[Constants.HeaderConstants.ContentLanguageHeader];
#else
            properties.LastModified = response.LastModified.ToUniversalTime();
            properties.ContentLanguage = response.Headers[HttpResponseHeader.ContentLanguage];
#endif

            properties.ContentDisposition = response.Headers[Constants.HeaderConstants.ContentDispositionResponseHeader];
            properties.ContentEncoding = response.Headers[HttpResponseHeader.ContentEncoding];

            // For range gets, only look at 'x-ms-blob-content-md5' for overall MD5
            if (response.Headers[HttpResponseHeader.ContentRange] != null)
            {
                properties.ContentMD5 = response.Headers[Constants.HeaderConstants.BlobContentMD5Header];
            }
            else
            {
                properties.ContentMD5 = response.Headers[HttpResponseHeader.ContentMd5];
            }

            properties.ContentType = response.Headers[HttpResponseHeader.ContentType];
            properties.CacheControl = response.Headers[HttpResponseHeader.CacheControl];

            string blobEncryption = response.Headers[Constants.HeaderConstants.ServerEncrypted];
            properties.IsServerEncrypted = string.Equals(blobEncryption, Constants.HeaderConstants.TrueHeader, StringComparison.OrdinalIgnoreCase);

            string incrementalCopy = response.Headers[Constants.HeaderConstants.IncrementalCopyHeader];
            properties.IsIncrementalCopy = string.Equals(incrementalCopy, Constants.HeaderConstants.TrueHeader, StringComparison.OrdinalIgnoreCase);

            // Get blob type
            string blobType = response.Headers[Constants.HeaderConstants.BlobType];
            if (!string.IsNullOrEmpty(blobType))
            {
                properties.BlobType = (BlobType)Enum.Parse(typeof(BlobType), blobType, true);
            }

            // Get lease properties
            properties.LeaseStatus = GetLeaseStatus(response);
            properties.LeaseState = GetLeaseState(response);
            properties.LeaseDuration = GetLeaseDuration(response);

            // Get the content length. Prioritize range and x-ms over content length for the special cases.
            string rangeHeader = response.Headers[HttpResponseHeader.ContentRange];
            string contentLengthHeader = response.Headers[Constants.HeaderConstants.ContentLengthHeader];
            string blobContentLengthHeader = response.Headers[Constants.HeaderConstants.BlobContentLengthHeader];
            if (!string.IsNullOrEmpty(rangeHeader))
            {
                properties.Length = long.Parse(rangeHeader.Split('/')[1], CultureInfo.InvariantCulture);
            }
            else if (!string.IsNullOrEmpty(blobContentLengthHeader))
            {
                properties.Length = long.Parse(blobContentLengthHeader, CultureInfo.InvariantCulture);
            }
            else if (!string.IsNullOrEmpty(contentLengthHeader))
            {
                // On Windows Phone, ContentLength property is not always same as Content-Length header,
                // so we try to parse the header first.
                properties.Length = long.Parse(contentLengthHeader, CultureInfo.InvariantCulture);
            }
            else
            {
                properties.Length = response.ContentLength;
            }

            // Get sequence number
            string sequenceNumber = response.Headers[Constants.HeaderConstants.BlobSequenceNumber];
            if (!string.IsNullOrEmpty(sequenceNumber))
            {
                properties.PageBlobSequenceNumber = long.Parse(sequenceNumber, CultureInfo.InvariantCulture);
            }

            // Get committed block count
            string comittedBlockCount = response.Headers[Constants.HeaderConstants.BlobCommittedBlockCount];
            if (!string.IsNullOrEmpty(comittedBlockCount))
            {
                properties.AppendBlobCommittedBlockCount = int.Parse(comittedBlockCount, CultureInfo.InvariantCulture);
            }
            
            // Get the tier of the blob
            string premiumPageBlobTierInferredString = response.Headers[Constants.HeaderConstants.AccessTierInferredHeader];
            if (!string.IsNullOrEmpty(premiumPageBlobTierInferredString))
            {
                properties.BlobTierInferred = Convert.ToBoolean(premiumPageBlobTierInferredString);
            }
            
            string blobTierString = response.Headers[Constants.HeaderConstants.AccessTierHeader];

            StandardBlobTier? standardBlobTier;
            PremiumPageBlobTier? premiumPageBlobTier;
            BlobHttpResponseParsers.GetBlobTier(properties.BlobType, blobTierString, out standardBlobTier, out premiumPageBlobTier);
            properties.StandardBlobTier = standardBlobTier;
            properties.PremiumPageBlobTier = premiumPageBlobTier;
            
            if ((properties.PremiumPageBlobTier.HasValue || properties.StandardBlobTier.HasValue) && !properties.BlobTierInferred.HasValue)
            {
                properties.BlobTierInferred = false;
            }

            // Get the rehydration status
            string rehydrationStatusString = response.Headers[Constants.HeaderConstants.ArchiveStatusHeader];
            properties.RehydrationStatus = BlobHttpResponseParsers.GetRehydrationStatus(rehydrationStatusString);

            // Get the time the tier of the blob was last modified
            string accessTierChangeTimeString = response.Headers[Constants.HeaderConstants.AccessTierChangeTimeHeader];
            if (!string.IsNullOrEmpty(accessTierChangeTimeString))
            {
                properties.BlobTierLastModifiedTime = DateTimeOffset.Parse(accessTierChangeTimeString, CultureInfo.InvariantCulture);
            }

            return properties;
        }
        public string CanonicalizeHttpRequest(HttpRequestMessage request, string accountName)
        {
            // Add the method (GET, POST, PUT, or HEAD).
            CanonicalizedString canonicalizedString = new CanonicalizedString(request.Method.Method);

            // Add the Content-* HTTP headers. Empty values are allowed.
            if (request.Content != null)
            {
                canonicalizedString.AppendCanonicalizedElement(HttpWebUtility.CombineHttpHeaderValues(request.Content.Headers.ContentEncoding));
                canonicalizedString.AppendCanonicalizedElement(HttpWebUtility.CombineHttpHeaderValues(request.Content.Headers.ContentLanguage));
                AuthenticationUtility.AppendCanonicalizedContentLengthHeader(canonicalizedString, request);
                canonicalizedString.AppendCanonicalizedElement((request.Content.Headers.ContentMD5 == null) ? null :
                                                               Convert.ToBase64String(request.Content.Headers.ContentMD5));
                canonicalizedString.AppendCanonicalizedElement((request.Content.Headers.ContentType == null) ? null :
                                                               request.Content.Headers.ContentType.ToString());
            }
            else
            {
                canonicalizedString.AppendCanonicalizedElement(null);
                canonicalizedString.AppendCanonicalizedElement(null);

#if WINDOWS_PHONE
                // Always add 0 for content length header for all requests except GET as Wininet on windows phone 8.1 has that behaviour
                if (request.Method != HttpMethod.Get)
                {
                    canonicalizedString.AppendCanonicalizedElement("0");
                }
                else
                {
                    canonicalizedString.AppendCanonicalizedElement(null);
                }
#else
                if (request.Method == HttpMethod.Put || request.Method == HttpMethod.Delete)
                {
                    canonicalizedString.AppendCanonicalizedElement("0");
                }
                else
                {
                    canonicalizedString.AppendCanonicalizedElement(null);
                }
#endif

                canonicalizedString.AppendCanonicalizedElement(null);
                canonicalizedString.AppendCanonicalizedElement(null);
            }

            // Add the Date HTTP header (only if the x-ms-date header is not being used)
            AuthenticationUtility.AppendCanonicalizedDateHeader(canonicalizedString, request);

            // Add If-* headers and Range header
            canonicalizedString.AppendCanonicalizedElement(AuthenticationUtility.GetCanonicalizedHeaderValue(request.Headers.IfModifiedSince));
            canonicalizedString.AppendCanonicalizedElement(CommonUtility.GetFirstHeaderValue(request.Headers.IfMatch));
            canonicalizedString.AppendCanonicalizedElement(CommonUtility.GetFirstHeaderValue(request.Headers.IfNoneMatch));
            canonicalizedString.AppendCanonicalizedElement(AuthenticationUtility.GetCanonicalizedHeaderValue(request.Headers.IfUnmodifiedSince));
            canonicalizedString.AppendCanonicalizedElement((request.Headers.Range == null) ? null :
                                                           CommonUtility.GetFirstHeaderValue(request.Headers.Range.Ranges));

            // Add any custom headers
            AuthenticationUtility.AppendCanonicalizedCustomHeaders(canonicalizedString, request);

            // Add the canonicalized URI element
            string resourceString = AuthenticationUtility.GetCanonicalizedResourceString(request.RequestUri, accountName);
            canonicalizedString.AppendCanonicalizedElement(resourceString);

            return(canonicalizedString.ToString());
        }
Example #23
0
        private Tuple <SysSQLString, String> BuildCustomerSqlString()    //生成客户档案SQL
        {
            var sssCust = new SysSQLString {
                Param = new Dictionary <string, string>()
            };

            switch (wStatus)
            {
            case WindowStatus.Copy:
            case WindowStatus.Add:
            {
                sssCust.sqlString =
                    "insert into tb_customer (cust_id,cust_code,cust_name,cust_short_name,cust_quick_code,cust_type,legal_person,province,city,county,cust_address,zip_code,cust_tel,cust_phone,cust_fax,cust_email,cust_website,enterprise_nature,tax_num,credit_rating,credit_line,credit_account_period,price_type,open_bank,bank_account,bank_account_person,billing_name,billing_address,billing_account,cust_remark,is_member,member_number,member_class,member_period_validity,accessories_discount,workhours_discount,status,enable_flag,yt_sap_code,yt_customer_manager,data_source,country,cust_relation,indepen_legalperson,market_segment,institution_code,com_constitution,registered_capital,vehicle_structure,agency,sap_code,business_scope,ent_qualification,cust_crm_guid,create_by,create_time) values (@cust_id,@cust_code,@cust_name,@cust_short_name,@cust_quick_code,@cust_type,@legal_person,@province,@city,@county,@cust_address,@zip_code,@cust_tel,@cust_phone,@cust_fax,@cust_email,@cust_website,@enterprise_nature,@tax_num,@credit_rating,@credit_line,@credit_account_period,@price_type,@open_bank,@bank_account,@bank_account_person,@billing_name,@billing_address,@billing_account,@cust_remark,@is_member,@member_number,@member_class,@member_period_validity,@accessories_discount,@workhours_discount,@status,@enable_flag,@yt_sap_code,@yt_customer_manager,@data_source,@country,@cust_relation,@indepen_legalperson,@market_segment,@institution_code,@com_constitution,@registered_capital,@vehicle_structure,@agency,@sap_code,@business_scope,@ent_qualification,@cust_crm_guid,@create_by,@create_time)";

                var guid = Guid.NewGuid().ToString();
                Id = guid;
                sssCust.Param.Add("cust_id", guid);
                sssCust.Param.Add("cust_code", CommonUtility.GetNewNo(DataSources.EnumProjectType.Customer));
                sssCust.Param.Add("create_by", GlobalStaticObj.UserID);
                sssCust.Param.Add("create_time", Common.LocalDateTimeToUtcLong(GlobalStaticObj.CurrentDateTime).ToString());
                sssCust.Param.Add("is_member", rdbis_member_y.Checked ? "1" : "0");
                sssCust.Param.Add("member_number", rdbis_member_y.Checked ? CommonUtility.GetNewNo(DataSources.EnumProjectType.CustomerSer_member) : "");
                sssCust.Param.Add("member_class", CommonCtrl.IsNullToString(cbomember_class.SelectedValue));
                var time = rdbis_member_y.Checked ? Convert.ToDateTime(dtpmember_period_validity.Value) : DateTime.Now;
                sssCust.Param.Add("member_period_validity", rdbis_member_y.Checked ? Common.LocalDateTimeToUtcLong(time).ToString() : "");
            }
            break;

            case WindowStatus.Edit:
                sssCust.sqlString =
                    "update tb_customer set cust_id = @cust_id, cust_code = @cust_code, cust_name = @cust_name, cust_short_name = @cust_short_name, cust_quick_code = @cust_quick_code, cust_type = @cust_type, legal_person = @legal_person, province = @province, city = @city, county = @county, cust_address = @cust_address, zip_code = @zip_code, cust_tel = @cust_tel, cust_phone = @cust_phone, cust_fax = @cust_fax, cust_email = @cust_email, cust_website = @cust_website, enterprise_nature = @enterprise_nature, tax_num = @tax_num, credit_rating = @credit_rating, credit_line = @credit_line, credit_account_period = @credit_account_period, price_type = @price_type, open_bank = @open_bank, bank_account = @bank_account, bank_account_person = @bank_account_person, billing_name = @billing_name, billing_address = @billing_address, billing_account = @billing_account, cust_remark = @cust_remark, is_member = @is_member, member_number = @member_number, member_class = @member_class, member_period_validity = @member_period_validity, accessories_discount = @accessories_discount, workhours_discount = @workhours_discount, status = @status, enable_flag = @enable_flag, yt_sap_code = @yt_sap_code, yt_customer_manager = @yt_customer_manager, data_source = @data_source, country = @country, cust_relation = @cust_relation, indepen_legalperson = @indepen_legalperson, market_segment = @market_segment, institution_code = @institution_code, com_constitution = @com_constitution, registered_capital = @registered_capital, vehicle_structure = @vehicle_structure, agency = @agency, sap_code = @sap_code, business_scope = @business_scope, ent_qualification = @ent_qualification, cust_crm_guid = @cust_crm_guid, update_by = @update_by, update_time = @update_time where cust_id = '" + Id + "'";
                sssCust.Param.Add("cust_id", Id);
                sssCust.Param.Add("cust_code", txtcust_code.Caption.Trim());
                sssCust.Param.Add("update_by", GlobalStaticObj.UserID);
                sssCust.Param.Add("update_time", Common.LocalDateTimeToUtcLong(GlobalStaticObj.CurrentDateTime).ToString());
                sssCust.Param.Add("is_member", rdbis_member_y.Checked ? "1" : "0");
                sssCust.Param.Add("member_number", rdbis_member_y.Checked ? txtmember_number.Caption : "");
                sssCust.Param.Add("member_class", rdbis_member_y.Checked ? CommonCtrl.IsNullToString(cbomember_class.SelectedValue) : "");
                var time1 = rdbis_member_y.Checked ? Convert.ToDateTime(dtpmember_period_validity.Value) : DateTime.Now;
                sssCust.Param.Add("member_period_validity", Common.LocalDateTimeToUtcLong(time1).ToString());
                break;
            }
            sssCust.Param.Add("cust_name", txtcust_name.Caption.Trim());
            sssCust.Param.Add("cust_short_name", txtcust_short_name.Caption.Trim());
            sssCust.Param.Add("cust_quick_code", "");
            sssCust.Param.Add("cust_type", CommonCtrl.IsNullToString(cbocust_type.SelectedValue));
            sssCust.Param.Add("legal_person", "");
            sssCust.Param.Add("province", CommonCtrl.IsNullToString(cboprovince.SelectedValue));
            sssCust.Param.Add("city", CommonCtrl.IsNullToString(cbocity.SelectedValue));
            sssCust.Param.Add("county", CommonCtrl.IsNullToString(cbocounty.SelectedValue));
            sssCust.Param.Add("cust_address", txtcust_address.Caption.Trim());
            sssCust.Param.Add("zip_code", txtzip_code.Caption.Trim());
            sssCust.Param.Add("cust_tel", txtcust_tel.Caption.Trim());
            sssCust.Param.Add("cust_phone", "");
            sssCust.Param.Add("cust_fax", txtcust_fax.Caption.Trim());
            sssCust.Param.Add("cust_email", txtcust_email.Caption.Trim());
            sssCust.Param.Add("cust_website", txtcust_website.Caption.Trim());
            sssCust.Param.Add("enterprise_nature", CommonCtrl.IsNullToString(cboenterprise_nature.SelectedValue));
            sssCust.Param.Add("tax_num", txttax_num.Caption.Trim());
            sssCust.Param.Add("credit_rating", CommonCtrl.IsNullToString(cbocredit_rating.SelectedValue));
            sssCust.Param.Add("credit_line", txtcredit_line.Caption.Trim());
            sssCust.Param.Add("credit_account_period", txtcredit_account_period.Caption.Trim());
            sssCust.Param.Add("price_type", CommonCtrl.IsNullToString(cboprice_type.SelectedValue));
            sssCust.Param.Add("open_bank", CommonCtrl.IsNullToString(cboopen_bank.SelectedValue));
            sssCust.Param.Add("bank_account", txtbank_account.Caption.Trim());
            sssCust.Param.Add("bank_account_person", txtbank_account_person.Caption.Trim());
            sssCust.Param.Add("billing_name", txtbilling_name.Caption.Trim());
            sssCust.Param.Add("billing_address", txtbilling_address.Caption.Trim());
            sssCust.Param.Add("billing_account", txtbilling_account.Caption.Trim());
            sssCust.Param.Add("cust_remark", txtcust_remark.Caption.Trim());
            sssCust.Param.Add("accessories_discount", "");
            sssCust.Param.Add("workhours_discount", "");
            sssCust.Param.Add("status", "1");
            sssCust.Param.Add("enable_flag", "1");
            sssCust.Param.Add("yt_sap_code", "");
            sssCust.Param.Add("yt_customer_manager", "");
            sssCust.Param.Add("data_source", ((Int32)DataSources.EnumDataSources.SELFBUILD).ToString());
            sssCust.Param.Add("country", CommonCtrl.IsNullToString(cbocounty.SelectedValue));
            sssCust.Param.Add("cust_relation", "");
            sssCust.Param.Add("indepen_legalperson", "");
            sssCust.Param.Add("market_segment", "");
            sssCust.Param.Add("institution_code", "");
            sssCust.Param.Add("com_constitution", "");
            sssCust.Param.Add("registered_capital", "");
            sssCust.Param.Add("vehicle_structure", "");
            sssCust.Param.Add("agency", "");
            sssCust.Param.Add("sap_code", "");
            sssCust.Param.Add("business_scope", "");
            sssCust.Param.Add("ent_qualification", "");
            sssCust.Param.Add("cust_crm_guid", "");

            var rtVaule = new Tuple <SysSQLString, String>(sssCust, Id);

            return(rtVaule);
        }
Example #24
0
        /// <summary>
        /// Asynchronously writes a sequence of bytes to the current stream, advances the current
        /// position within this stream by the number of bytes written, and monitors cancellation requests.
        /// </summary>
        /// <param name="buffer">An array of bytes. This method copies count bytes from
        /// buffer to the current stream.</param>
        /// <param name="offset">The zero-based byte offset in buffer at which to begin
        /// copying bytes to the current stream.</param>
        /// <param name="count">The number of bytes to be written to the current stream.</param>
        /// <param name="cancellationToken">The token to monitor for cancellation requests.</param>
        /// <returns>A task that represents the asynchronous write operation.</returns>
        public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
        {
            CommonUtility.AssertNotNull("buffer", buffer);
            CommonUtility.AssertInBounds("offset", offset, 0, buffer.Length);
            CommonUtility.AssertInBounds("count", count, 0, buffer.Length - offset);

            if (this.committed)
            {
                throw new InvalidOperationException(SR.FileStreamAlreadyCommitted);
            }

            this.currentOffset += count;
            int initialOffset = offset;
            int initialCount  = count;

            List <Task> continueTasks = new List <Task>();

            if (this.lastException == null)
            {
                while (count > 0)
                {
                    int maxBytesToWrite = this.streamWriteSizeInBytes - (int)this.internalBuffer.Length;
                    int bytesToWrite    = Math.Min(count, maxBytesToWrite);

                    await this.internalBuffer.WriteAsync(buffer, offset, bytesToWrite, cancellationToken).ConfigureAwait(false);

                    if (this.rangeChecksum != null)
                    {
                        this.rangeChecksum.UpdateHash(buffer, offset, bytesToWrite);
                    }

                    count  -= bytesToWrite;
                    offset += bytesToWrite;

                    if (bytesToWrite == maxBytesToWrite)
                    {
                        TaskCompletionSource <bool> continueTCS = new TaskCompletionSource <bool>();
                        continueTasks.Add(continueTCS.Task);

                        // Note that we do not await on temptask, nor do we store it.
                        // We do not await temptask so as to enable parallel reads and writes.
                        // We could store it and await on it later, but that ends up being more complicated
                        // than what we actually do, which is have each write operation manage its own exceptions.
                        Task temptask = this.DispatchWriteAsync(continueTCS, cancellationToken);

                        // We need to account for the fact that we're not awaiting on DispatchWriteAsync.
                        // DispatchWriteAsync is written in such a manner that any exceptions thrown after
                        // the first await point are handled internally.  This here is to account for
                        // exceptions that could happen inline, before an await point is encountered.
                        if (temptask.IsFaulted)
                        {
                            //We should make sure any exception thrown before the awaiting point in DispatchWriteAsync are stored in this.LastException
                            //We don't want to throw the tempTask.Exception directly since that would result in an aggregate exception
                            ThrowLastExceptionIfExists();
                        }

                        cancellationToken.ThrowIfCancellationRequested();
                    }
                }
            }

            // Update transactional, then update full blob, in that order.
            // This way, if there's any bit corruption that happens in between the two, we detect it at PutBlock on the service,
            // rather than GetBlob + validate on the client
            if (this.fileChecksum != null)
            {
                this.fileChecksum.UpdateHash(buffer, initialOffset, initialCount);
            }

            // Wait until all continueTasks complete to let all dispatched writes increment noPendingWritesEvent counter.
            await Task.WhenAll(continueTasks);
        }
Example #25
0
    public CustStatusChangeResult CustStatusChange(string ProvinceID, string CRMID, string CustType, string CRMAccount, string Status,
                                                   string Description, string ExtendField)
    {
        CustStatusChangeResult Result = new CustStatusChangeResult();
        string SPID = "";

        Result.Result           = ErrorDefinition.BT_IError_Result_UnknowError_Code;
        Result.ErrorDescription = "";
        Result.ExtendField      = "";
        Result.CRMID            = "";
        Result.ProvinceID       = "";
        try
        {
            if (CommonUtility.IsEmpty(ProvinceID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidProvinceID_Msg + ",不能为空";
                return(Result);
            }

            if (ProvinceID.Length != ConstDefinition.Length_ProvinceID)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidProvinceID_Msg + ",长度有误";
                return(Result);
            }

            if (CommonUtility.IsEmpty(CRMID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",CRMID不能为空";
                return(Result);
            }

            if (CommonUtility.IsEmpty(CustType))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidUserType_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidUserType_Msg + ",CustType不能为空";
                return(Result);
            }

            if (CommonUtility.IsEmpty(Status))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidStatus_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidStatus_Msg + ",不能为空";
                return(Result);
            }
            if (!CommonUtility.IsEmpty(ExtendField))
            {
                SPID = CommonBizRules.GetValueFromXmlStr(ExtendField, "SPID");
            }
            //if (CommonUtility.IsEmpty(CRMAccount))
            //{
            //    Result.Result = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
            //    Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",CRMAccount不能为空";
            //    return Result;
            //}

            Result.Result     = BTForCrmBizRules.CustStatusChange(ProvinceID, CRMID, CustType, CRMAccount, Status, SPID, out Result.ErrorDescription, out Result.ProvinceID, out Result.CRMID);
            Result.ProvinceID = ProvinceID;
        }
        catch (Exception ex)
        {
            Result.Result           = ErrorDefinition.IError_Result_System_UnknowError_Code;
            Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + "," + ex.Message;
        }
        finally
        {
            #region WriteLog
            StringBuilder msg = new StringBuilder();
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n");
            msg.Append("客户状态变更接口 " + DateTime.Now.ToString("u") + "\r\n");
            msg.Append(";ProvinceID - " + ProvinceID);
            msg.Append(";CRMID - " + CRMID);
            msg.Append(";CRMAccount - " + CRMAccount);
            msg.Append(";CustType - " + CustType);
            msg.Append(";Status - " + Status);
            msg.Append(";Description - " + Description);
            msg.Append(";ExtendField - " + ExtendField);


            msg.Append("\r\n");
            msg.Append("处理结果 - " + Result.Result);
            msg.Append("; 错误描述 - " + Result.ErrorDescription);
            msg.Append("; ProvinceID - " + Result.ProvinceID);
            msg.Append("; CRMID - " + Result.CRMID);
            msg.Append("; ErrorDescription - " + Result.ErrorDescription);
            msg.Append("; ExtendField - " + Result.ExtendField + "\r\n");
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n");

            BTUCenterInterfaceLog.CenterForCRM("CustStatusChange", msg);
            #endregion
        }
        return(Result);
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            IcsonSessionInfo oSessionInfo = CommonUtility.GetUserSession(Context);

            CustomerInfo cInfo  = oSessionInfo.sCustomer;
            int          cSysNo = cInfo.SysNo;

            bool   result = false;
            string msg    = String.Empty;

            try
            {
                switch (Cmd)
                {
                //添加商品到收藏
                case "add":
                {
                    WishListInfo wInfo = new WishListInfo();
                    wInfo.CustomerSysNo = cSysNo;
                    wInfo.ProductSysNo  = productSysNo;
                    WishListManager.GetInstance().Insert(wInfo);
                    result = true;
                    msg    = "成功添加";
                    Response.Write(JsonContentTransfomer <object> .GetJsonContent(new { IsSuccess = result, Msg = msg }));
                    break;
                }

                //删除单个收藏商品
                case "delete":
                {
                    foreach (string pid in productSysNos)
                    {
                        WishListManager.GetInstance().Delete(cSysNo, int.Parse(pid));
                    }
                    msg = "删除成功";
                    Response.Write(JsonContentTransfomer <object> .GetJsonContent(new { IsSuccess = result, Msg = msg }));
                    break;
                }

                //清空收藏商品
                case "empty":
                {
                    WishListManager.GetInstance().Clear(cSysNo);
                    msg = "清空收藏夹成功";
                    Response.Write(JsonContentTransfomer <object> .GetJsonContent(new { IsSuccess = result, Msg = msg }));
                    break;
                }

                //获得分页的收藏列表
                default:
                {
                    Response.Write(CustomerHelper.GetCustomerWishListProducts(cSysNo, StartIndex));
                    break;
                }
                }
            }
            catch
            {
                msg = "用户请求的操作失败";
                Response.Write(JsonContentTransfomer <object> .GetJsonContent(new { IsSuccess = result, Msg = msg }));
            }
        }
Example #27
0
    public IncorporateAccountResult IncorporateAccount(string ProvinceID, string IncorporatedCustType, string IncorporatedCRMID,
                                                       string IncorporatedAccount, string SavedCRMID, string SavedAccount, string SavedCustType, string ExtendField)
    {
        string SPID = "";
        IncorporateAccountResult Result = new IncorporateAccountResult();

        Result.Result           = ErrorDefinition.BT_IError_Result_UnknowError_Code;
        Result.ProvinceID       = "";
        Result.ErrorDescription = "";
        Result.CRMID            = "";
        Result.CustID           = "";
        Result.SavedCustType    = "";
        Result.ExtendField      = "";
        try
        {
            #region 验证
            if (CommonUtility.IsEmpty(ProvinceID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidProvinceID_Msg + ",不能为空";
                return(Result);
            }

            if (ProvinceID.Length != ConstDefinition.Length_ProvinceID)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidProvinceID_Msg + ",长度有误";
                return(Result);
            }

            if (CommonUtility.IsEmpty(IncorporatedCustType))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",IncorporatedCustType不能为空";
                return(Result);
            }

            if (CommonUtility.IsEmpty(IncorporatedCRMID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",IncorporatedCRMID不能为空";
                return(Result);
            }

            //if (CommonUtility.IsEmpty(IncorporatedAccount))
            //{
            //    Result.Result = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
            //    Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",IncorporatedAccount不能为空";
            //    return Result;
            //}

            if (CommonUtility.IsEmpty(SavedCRMID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",SavedCRMID不能为空";
                return(Result);
            }

            if (!CommonUtility.IsEmpty(ExtendField))
            {
                SPID = CommonBizRules.GetValueFromXmlStr(ExtendField, "SPID");
            }
            //if (CommonUtility.IsEmpty(SavedAccount))
            //{
            //    Result.Result = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
            //    Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",SavedAccount不能为空";
            //    return Result;
            //}

            if (CommonUtility.IsEmpty(SavedCustType))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",SavedCustType不能为空";
                return(Result);
            }
            if (ConstDefinition.Span_UserType.IndexOf(IncorporatedCustType) < 0)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidUserType_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidUserType_Msg + ",无该用户类型";
                return(Result);
            }
            if (ConstDefinition.Span_UserType.IndexOf(SavedCustType) < 0)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidUserType_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidUserType_Msg + ",无该用户类型";
                return(Result);
            }
            //string tmp = "01,02,03,09,11";
            //if (tmp.IndexOf(IncorporatedCustType)<0)
            //{
            //    Result.Result = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
            //    Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",IncorporatedCustType取值不在范围内";
            //    return Result;
            //}
            //if (tmp.IndexOf(SavedCustType) < 0)
            //{
            //    Result.Result = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
            //    Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",SavedCustType取值不在范围内";
            //    return Result;
            //}
            #endregion

            Result.Result = BTForCrmBizRules.IncorporateAccount(ProvinceID, IncorporatedCustType, IncorporatedCRMID, IncorporatedAccount, SavedCRMID, SavedAccount,
                                                                SavedCustType, SPID, out Result.ProvinceID, out Result.ErrorDescription, out Result.CRMID, out Result.CustID, out Result.SavedCustType);
        }
        catch (Exception ex)
        {
            Result.Result           = ErrorDefinition.IError_Result_System_UnknowError_Code;
            Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + "," + ex.Message;
        }
        finally
        {
            #region WriteLog
            StringBuilder msg = new StringBuilder();
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n");
            msg.Append("CRM客户合并接口 " + DateTime.Now.ToString("u") + "\r\n");
            msg.Append(";ProvinceID - " + ProvinceID);
            msg.Append(";IncorporatedCustType - " + IncorporatedCustType);
            msg.Append(";IncorporatedCRMID - " + IncorporatedCRMID);
            msg.Append(";IncorporatedAccount - " + IncorporatedAccount);
            msg.Append(";SavedCRMID - " + SavedCRMID);
            msg.Append(";SavedAccount - " + SavedAccount);
            msg.Append(";SavedCustType - " + SavedCustType);
            msg.Append(";ExtendField - " + ExtendField);


            msg.Append("\r\n");
            msg.Append("处理结果 - " + Result.Result);
            msg.Append("; 错误描述 - " + Result.ErrorDescription);
            msg.Append("; ProvinceID - " + Result.ProvinceID);
            msg.Append("; CRMID - " + Result.CRMID);
            msg.Append("; CustID - " + Result.CustID);
            msg.Append("; SavedCustType - " + Result.SavedCustType);
            msg.Append("; ExtendField - " + Result.ExtendField + "\r\n");
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n");

            BTUCenterInterfaceLog.CenterForCRM("IncorporateAccount", msg);
            #endregion
        }

        return(Result);
    }
Example #28
0
        public void Fill(SqlDataReader reader)
        {
            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWPathoRemarks"))
            {
                this.anwPathoRemarks = Convert.ToString(reader["ANWPathoRemarks"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpousePathoRemarks"))
            {
                this.spousePathoRemarks = Convert.ToString(reader["SpousePathoRemarks"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWSubjectId"))
            {
                this.anwSubjectId = Convert.ToString(reader["ANWSubjectId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SubjectName"))
            {
                this.subjectName = Convert.ToString(reader["SubjectName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseSubjectID"))
            {
                this.spouseSubjectId = Convert.ToString(reader["SpouseSubjectID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseName"))
            {
                this.spouseName = Convert.ToString(reader["SpouseName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "RCHID"))
            {
                this.rchId = Convert.ToString(reader["RCHID"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ContactNo"))
            {
                this.contactNo = Convert.ToString(reader["ContactNo"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ECNumber"))
            {
                this.ecNumber = Convert.ToString(reader["ECNumber"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "LMPDate"))
            {
                this.lmpDate = Convert.ToString(reader["LMPDate"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "GestationalAge"))
            {
                this.ga = Convert.ToDecimal(reader["GestationalAge"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ObstetricScore"))
            {
                this.obstetricScore = Convert.ToString(reader["ObstetricScore"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Age"))
            {
                this.age = Convert.ToInt32(reader["Age"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PostPNDTSchedulingId"))
            {
                this.postPNDTSchedulingId = Convert.ToInt32(reader["PostPNDTSchedulingId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWCBCResult"))
            {
                this.anwCBCTestResult = Convert.ToString(reader["ANWCBCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWSSTResult"))
            {
                this.anwSSTestResult = Convert.ToString(reader["ANWSSTResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWHPLCResult"))
            {
                this.anwHPLCTestResult = Convert.ToString(reader["ANWHPLCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANWHPLCDiagnosis"))
            {
                this.anwHPLCDiagnosis = Convert.ToString(reader["ANWHPLCDiagnosis"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SPouseHPLCDiagnosis"))
            {
                this.spouseHPLCDiagnosis = Convert.ToString(reader["SPouseHPLCDiagnosis"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseCBCResult"))
            {
                this.spouseCBCTestResult = Convert.ToString(reader["SpouseCBCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseSSTResult"))
            {
                this.spouseSSTestResult = Convert.ToString(reader["SpouseSSTResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseHPLCResult"))
            {
                this.spouseHPLCTestResult = Convert.ToString(reader["SpouseHPLCResult"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PrePNDTCounsellingDateTime"))
            {
                this.prePNDTCounsellingDateTime = Convert.ToString(reader["PrePNDTCounsellingDateTime"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PrePNDTCounsellorName"))
            {
                this.prePNDTCounsellorName = Convert.ToString(reader["PrePNDTCounsellorName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PrePNDTCounsellingRemarks"))
            {
                this.prePNDTCounsellingRemarks = Convert.ToString(reader["PrePNDTCounsellingRemarks"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PrePNDTCounsellingStatus"))
            {
                this.prePNDTCounsellingStatus = Convert.ToString(reader["PrePNDTCounsellingStatus"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SchedulePNDTDate"))
            {
                this.schedulePrePNDTDate = Convert.ToString(reader["SchedulePNDTDate"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SchedulePNDTTime"))
            {
                this.schedulePrePNDTTime = Convert.ToString(reader["SchedulePNDTTime"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDDateTime"))
            {
                this.pndtDateTime = Convert.ToString(reader["PNDDateTime"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDTestObstetrician"))
            {
                this.pndtObstetrician = Convert.ToString(reader["PNDTestObstetrician"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDTResults"))
            {
                this.pndtResults = Convert.ToString(reader["PNDTResults"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDTClinicalHistory"))
            {
                this.pndtClinicalHistory = Convert.ToString(reader["PNDTClinicalHistory"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDTExamination"))
            {
                this.pndtExamination = Convert.ToString(reader["PNDTExamination"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDTProcedureOfTesting"))
            {
                this.pndtProcedureOfTesting = Convert.ToString(reader["PNDTProcedureOfTesting"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDTComplications"))
            {
                this.pndtComplications = Convert.ToString(reader["PNDTComplications"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "foetalDisease"))
            {
                this.foetalDisease = Convert.ToBoolean(reader["foetalDisease"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PrePNDTCounsellorName"))
            {
                this.pndtCounsellorName = Convert.ToString(reader["PrePNDTCounsellorName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PNDTDiagnosisName"))
            {
                this.pndtDiagnosis = Convert.ToString(reader["PNDTDiagnosisName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "CounsellorId"))
            {
                this.postPNDTCounsellorId = Convert.ToInt32(reader["CounsellorId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PostPNDTCounsellorName"))
            {
                this.postPNDTCounsellorName = Convert.ToString(reader["PostPNDTCounsellorName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PostPNDTCounsellingId"))
            {
                this.postPNDTCounsellingId = Convert.ToInt32(reader["PostPNDTCounsellingId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "AssignedObstetricianId"))
            {
                this.postPNDTObstetricianId = Convert.ToInt32(reader["AssignedObstetricianId"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PostPNDTObsetricianName"))
            {
                this.postPNDTObstetricianName = Convert.ToString(reader["PostPNDTObsetricianName"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ScheduleMTPDate"))
            {
                this.mtpScheduleDate = Convert.ToString(reader["ScheduleMTPDate"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ScheduleMTPTime"))
            {
                this.mtpScheduleTime = Convert.ToString(reader["ScheduleMTPTime"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PostPNDTCounsellingDateTime"))
            {
                this.postPNDTCounsellingDateTime = Convert.ToString(reader["PostPNDTCounsellingDateTime"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PostPNDTCounsellingRemarks"))
            {
                this.postPNDTCounsellingRemarks = Convert.ToString(reader["PostPNDTCounsellingRemarks"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "PostPNDTCounsellingStatus"))
            {
                this.postPNDTCounsellingStatus = Convert.ToString(reader["PostPNDTCounsellingStatus"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "SpouseAge"))
            {
                this.spouseAge = Convert.ToInt32(reader["SpouseAge"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_MCV"))
            {
                this.anwMCV = Convert.ToString(reader["ANW_MCV"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_RDW"))
            {
                this.anwRDW = Convert.ToString(reader["ANW_RDW"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_RBC"))
            {
                this.anwRBC = Convert.ToString(reader["ANW_RBC"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbA0"))
            {
                this.anwHbA0 = Convert.ToString(reader["ANW_HbA0"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbA2"))
            {
                this.anwHbA2 = Convert.ToString(reader["ANW_HbA2"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbF"))
            {
                this.anwHbF = Convert.ToString(reader["ANW_HbF"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbD"))
            {
                this.anwHbD = Convert.ToString(reader["ANW_HbD"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "ANW_HbS"))
            {
                this.anwHbS = Convert.ToString(reader["ANW_HbS"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_MCV"))
            {
                this.spouseMCV = Convert.ToString(reader["Spouse_MCV"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_RDW"))
            {
                this.spouseRDW = Convert.ToString(reader["Spouse_RDW"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_RBC"))
            {
                this.spouseRBC = Convert.ToString(reader["Spouse_RBC"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbA0"))
            {
                this.spouseHbA0 = Convert.ToString(reader["Spouse_HbA0"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbA2"))
            {
                this.spouseHbA2 = Convert.ToString(reader["Spouse_HbA2"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbF"))
            {
                this.spouseHbF = Convert.ToString(reader["Spouse_HbF"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbS"))
            {
                this.spouseHbS = Convert.ToString(reader["Spouse_HbS"]);
            }

            if (CommonUtility.IsColumnExistsAndNotNull(reader, "Spouse_HbD"))
            {
                this.spouseHbD = Convert.ToString(reader["Spouse_HbD"]);
            }
        }
Example #29
0
    public ChangeUserAuthenStyleResult ChangeUserAuthenStyle(string ProvinceID, string OriginalID, string NewID,
                                                             string DealType, AuthenRecord[] AuthenRecords, string ExtendField)
    {
        ChangeUserAuthenStyleResult Result = new ChangeUserAuthenStyleResult();

        Result.Result           = ErrorDefinition.BT_IError_Result_UnknowError_Code;
        Result.NewID            = "";
        Result.ErrorDescription = "";
        Result.OriginalID       = "";
        Result.ErrorDescription = "";
        Result.ExtendField      = "";
        string SPID = "";

        try
        {
            #region 验证
            if (CommonUtility.IsEmpty(ProvinceID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidProvinceID_Msg + ",不能为空";
                return(Result);
            }

            if (ProvinceID.Length != ConstDefinition.Length_ProvinceID)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidProvinceID_Msg + ",长度有误";
                return(Result);
            }

            if (CommonUtility.IsEmpty(OriginalID))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",OriginalID不能为空";
                return(Result);
            }

            if (CommonUtility.IsEmpty(DealType))
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",DealType不能为空";
                return(Result);
            }
            string tmp = "1;2;3";
            if (tmp.IndexOf(DealType) < 0)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",DealType类型不正确!";
                return(Result);
            }
            if (DealType == "1")
            {
                if (CommonUtility.IsEmpty(NewID))
                {
                    Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                    Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",NewID不能为空";
                    return(Result);
                }
            }
            if (AuthenRecords == null)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",AuthenRecords不能为空";
                return(Result);
            }
            if (AuthenRecords.Length <= 0)
            {
                Result.Result           = ErrorDefinition.BT_IError_Result_InValidParameter_Code;
                Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidParameter_Msg + ",AuthenRecords数组长度为小于0";
                return(Result);
            }

            if (!CommonUtility.IsEmpty(ExtendField))
            {
                SPID = CommonBizRules.GetValueFromXmlStr(ExtendField, "SPID");
            }


            #endregion

            Result.Result = BTForCrmBizRules.ChangeUserAuthenStyle(ProvinceID, OriginalID, NewID, DealType, AuthenRecords, SPID, out Result.NewID, out Result.OriginalID, out Result.ErrorDescription);
        }
        catch (Exception ex)
        {
            Result.Result           = ErrorDefinition.IError_Result_System_UnknowError_Code;
            Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + "," + ex.Message;
        }
        finally
        {
            #region WriteLog
            StringBuilder msg = new StringBuilder();
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n");
            msg.Append("认证方式变更接口 " + DateTime.Now.ToString("u") + "\r\n");
            msg.Append(";ProvinceID - " + ProvinceID);
            msg.Append(";OriginalID - " + OriginalID);
            msg.Append(";NewID - " + NewID);
            msg.Append(";DealType - " + DealType);
            if (AuthenRecords != null)
            {
                if (AuthenRecords.Length > 0)
                {
                    for (int i = 0; i < AuthenRecords.Length; i++)
                    {
                        msg.Append(";AuthenType - " + AuthenRecords[i].AuthenType);
                        msg.Append(";AuthenName - " + AuthenRecords[i].AuthenName);
                    }
                }
            }
            msg.Append(";ExtendField - " + ExtendField);


            msg.Append("\r\n");
            msg.Append("处理结果 - " + Result.Result);
            msg.Append("; 错误描述 - " + Result.ErrorDescription);

            msg.Append("; NewID - " + Result.NewID);
            msg.Append("; OriginalID - " + Result.OriginalID);
            msg.Append("; ExtendField - " + Result.ExtendField + "\r\n");
            msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n");

            BTUCenterInterfaceLog.CenterForCRM("ChangeUserAuthenStyle", msg);
            #endregion
        }

        return(Result);
    }
Example #30
0
        public GaskingKickback ValidateGasKing(int tillNumber, int saleNumber, byte registerNumber,
                                               string userCode, out ErrorMessage errorMessage, bool isCardSwipedInTenderScreen = false)
        {
            errorMessage = new ErrorMessage();
            saleObj      = _saleManager.GetCurrentSale(saleNumber, tillNumber, registerNumber, userCode, out errorMessage);
            var customer = saleObj.Customer.LoyaltyCardSwiped ?
                           _customerService.GetClientCardForGasKingCustomer(saleObj.Customer.LoyaltyCard) : null;

            if (customer == null)
            {
                // errorMessage.MessageStyle.Message = "No customer is selected";
                //errorMessage.StatusCode = HttpStatusCode.NotAcceptable;
                return(new GaskingKickback
                {
                    IsKickBackLinked = false,
                    PointsReedemed = saleObj.Customer.Balance_Points,
                    Value = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
                });
            }
            saleObj.Customer.Loyalty_Code = customer.CardNumber;
            saleObj.Customer.PointsCard_AllowRedemption = customer.AllowRedemption;
            var  arcust           = saleObj.Customer.AR_Customer;
            bool isKickBackLinked = false;

            if (_policyManager.Use_KickBack)
            {
                // if (!customer.AllowRedemption && isCardSwipedInTenderScreen)
                //if (isCardSwipedInTenderScreen)
                //{
                //    return new GaskingKickback
                //    {
                //        IsKickBackLinked = false,
                //        PointsReedemed = saleObj.Customer.Balance_Points,
                //        Value = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
                //    };
                //}

                // Shiny -This Pointcard loading should have done as part of Customer loading - Since Previous code is not done properly at Customer class I can't change it- I am forced to do this here
                var data = _kickBackService.GaskingKickback(saleObj);
                if (data.Rows.Count > 0)
                {
                    var row = data.Rows[0];
                    saleObj.Customer.PointCardNum   = CommonUtility.GetStringValue(row["PointCardNum"]);
                    saleObj.Customer.PointCardPhone = String.IsNullOrEmpty(CommonUtility.GetStringValue(row["phonenum"])) ? ""
                                    : CommonUtility.GetStringValue(row["phonenum"]);
                    saleObj.Customer.PointCardSwipe = "0"; // 0-from database based on GK card swiped, 1-from phone number, 2-swiped
                                                           //  '                            SA.Customer.PointsCard_AllowRedemption = True- we need to check the Gasking card setting
                    saleObj.Customer.PointsCard_AllowRedemption = _customerService.
                                                                  Check_Allowredemption(saleObj.Customer.LoyaltyCard);

                    //if (isCardSwipedInTenderScreen)
                    // {

                    //if (!string.IsNullOrEmpty(saleObj.Customer.PointCardNum) && !customer.AllowRedemption)
                    //{
                    //  //  ProcessKickBack((short)(1), userCode, ref saleObj, out errorMessage);

                    //    if (!isCardSwipedInTenderScreen)
                    //    {
                    //        return new GaskingKickback
                    //        {
                    //            IsKickBackLinked = true,
                    //            PointsReedemed = _policyManager.L_RedeemPnts - 1,
                    //            Value = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
                    //        };
                    //    }
                    //}
                    //else
                    if (!string.IsNullOrEmpty(saleObj.Customer.PointCardNum))
                    //&& ((saleObj.Customer.PointsCard_AllowRedemption && isCardSwipedInTenderScreen) ||
                    //(!isCardSwipedInTenderScreen)))
                    {
                        isKickBackLinked = ProcessKickBack((short)(0), userCode, ref saleObj, out errorMessage);

                        if (!isCardSwipedInTenderScreen && !customer.AllowRedemption)
                        {
                            return(new GaskingKickback
                            {
                                IsKickBackLinked = true,
                                PointsReedemed = _policyManager.L_RedeemPnts - 1,
                                Value = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
                            });
                        }

                        if (isCardSwipedInTenderScreen)
                        {
                            return(new GaskingKickback
                            {
                                IsKickBackLinked = isKickBackLinked && customer.AllowRedemption,
                                PointsReedemed = saleObj.Customer.Balance_Points,
                                Value = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
                            });
                        }
                    }
                    else
                    {
                        return(new GaskingKickback
                        {
                            IsKickBackLinked = false,
                            PointsReedemed = saleObj.Customer.Balance_Points,
                            Value = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
                        });
                    }
                    // }
                    //else
                    //{
                    //    if (!string.IsNullOrEmpty(saleObj.Customer.PointCardNum))
                    //    {
                    //        isKickBackLinked = ProcessKickBack((short)(0), userCode, ref saleObj, out errorMessage);
                    //    }
                    //}
                }

                data = null;
            }

            else
            {
                return(new GaskingKickback
                {
                    IsKickBackLinked = true,
                    PointsReedemed = _policyManager.L_RedeemPnts - 1,
                    Value = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
                });
            }
            saleObj.Customer.AR_Customer = arcust;
            CacheManager.AddCurrentSaleForTill(tillNumber, saleNumber, saleObj);

            var resp = new GaskingKickback
            {
                IsKickBackLinked = isKickBackLinked,
                PointsReedemed   = saleObj.Customer.Balance_Points,
                Value            = (saleObj.Customer.Balance_Points * saleObj.Customer.Points_ExchangeRate).ToString("0.00")
            };

            return(resp);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="MapResponseDto"/> class.
 /// </summary>
 /// <param name="requestToken">The request token.</param>
 public MapResponseDto(string requestToken)
     : base(requestToken)
 {
     MapUrl = CommonUtility.ResolveServerUrl(string.Format("{0}{1}",
                                                           CommonUtility.GetAppSetting <string>("UploadFolderItemImagePath"), "NJ_Fairground_guide_map.jpg"), false);
     MapCoordinates = new List <MapCoordinateModel>()
     {
         new MapCoordinateModel()
         {
             Title = "Blood Mobile", Shape = "rect", Coords = "271,531,297,554"
         },
         new MapCoordinateModel()
         {
             Title = "Performing Arts tent", Shape = "rect", Coords = "498,532,524,555"
         },
         new MapCoordinateModel()
         {
             Title = "FIRST AID (in Admin. Bldg.)", Shape = "rect", Coords = "446,588,472,611"
         },
         new MapCoordinateModel()
         {
             Title = "Family Entertainment Area [Circus Hollywood, racing pigs, petting zoo]", Shape = "rect", Coords = "534,549,560,572"
         },
         new MapCoordinateModel()
         {
             Title = "INFORMATION BOOTHS", Shape = "rect", Coords = "682,483,708,506"
         },
         new MapCoordinateModel()
         {
             Title = "Wheelchairs/scooters", Shape = "rect", Coords = "670,461,696,484"
         },
         new MapCoordinateModel()
         {
             Title = "Christmas Tree Exhibit", Shape = "rect", Coords = "628,470,654,493"
         },
         new MapCoordinateModel()
         {
             Title = "Newton Rotary Food Booth", Shape = "rect", Coords = "627,450,653,473"
         },
         new MapCoordinateModel()
         {
             Title = "Oxen Display", Shape = "rect", Coords = "574,457,600,480"
         },
         new MapCoordinateModel()
         {
             Title = "Winegarden", Shape = "rect", Coords = "524,458,550,481"
         },
         new MapCoordinateModel()
         {
             Title = "RESTROOMS", Shape = "rect", Coords = "488,463,514,486"
         },
         new MapCoordinateModel()
         {
             Title = "ATM", Shape = "rect", Coords = "489,440,515,463"
         },
         new MapCoordinateModel()
         {
             Title = "Rare Heritage Breeds Education Center", Shape = "rect", Coords = "461,456,487,479"
         },
         new MapCoordinateModel()
         {
             Title = "ATM", Shape = "rect", Coords = "370,466,396,489"
         },
         new MapCoordinateModel()
         {
             Title = "Admissions/Ticket Office", Shape = "rect", Coords = "344,465,370,488"
         },
         new MapCoordinateModel()
         {
             Title = "STEAM Robotics", Shape = "rect", Coords = "350,446,376,469"
         },
         new MapCoordinateModel()
         {
             Title = "INFORMATION BOOTHS", Shape = "rect", Coords = "266,468,292,491"
         },
         new MapCoordinateModel()
         {
             Title = "New Jersey Hall of Fame Exhibit", Shape = "rect", Coords = "245,456,271,479"
         },
         new MapCoordinateModel()
         {
             Title = "Community Service Tent", Shape = "rect", Coords = "311,420,337,443"
         },
         new MapCoordinateModel()
         {
             Title = "Craft Tent", Shape = "rect", Coords = "347,423,394,446"
         },
         new MapCoordinateModel()
         {
             Title = "Sussex County Building", Shape = "rect", Coords = "347,399,394,422"
         },
         new MapCoordinateModel()
         {
             Title = "Commercial Tent", Shape = "rect", Coords = "351,292,398,315"
         },
         new MapCoordinateModel()
         {
             Title = "Livestock Barns", Shape = "rect", Coords = "634,399,681,422"
         },
         new MapCoordinateModel()
         {
             Title = "Livestock Barns", Shape = "rect", Coords = "635,373,682,396"
         },
         new MapCoordinateModel()
         {
             Title = "Livestock Barns", Shape = "rect", Coords = "635,348,682,371"
         },
         new MapCoordinateModel()
         {
             Title = "Livestock Barns", Shape = "rect", Coords = "635,322,682,345"
         },
         new MapCoordinateModel()
         {
             Title = "Livestock Barns", Shape = "rect", Coords = "635,298,682,321"
         },
         new MapCoordinateModel()
         {
             Title = "Milking Parlor", Shape = "rect", Coords = "635,274,676,297"
         },
         new MapCoordinateModel()
         {
             Title = "Snook Agricultural Museum &amp; Antique Engines", Shape = "rect", Coords = "541,269,585,290"
         },
         new MapCoordinateModel()
         {
             Title = "Agriculture Honor Garden", Shape = "rect", Coords = "541,295,585,316"
         },
         new MapCoordinateModel()
         {
             Title = "Livestock Pavilion", Shape = "rect", Coords = "540,338,584,356"
         },
         new MapCoordinateModel()
         {
             Title = "Agriculture Division Food Booth", Shape = "rect", Coords = "541,363,567,399"
         },
         new MapCoordinateModel()
         {
             Title = "Richards Exhibit Building", Shape = "rect", Coords = "445,350,500,391"
         },
         new MapCoordinateModel()
         {
             Title = "Newton Rotary Food Booth", Shape = "rect", Coords = "452,260,492,281"
         },
         new MapCoordinateModel()
         {
             Title = "4-H Shotwell Exhibit Building", Shape = "rect", Coords = "458,283,488,304"
         },
         new MapCoordinateModel()
         {
             Title = "Board of Agriculture BBQ Pavilion", Shape = "rect", Coords = "473,306,503,327"
         },
         new MapCoordinateModel()
         {
             Title = "Carnival", Shape = "rect", Coords = "215,334,239,352"
         },
         new MapCoordinateModel()
         {
             Title = "ATM", Shape = "rect", Coords = "678,273,702,291"
         },
         new MapCoordinateModel()
         {
             Title = "Bicycle Stunt Show", Shape = "rect", Coords = "437,392,461,410"
         },
         new MapCoordinateModel()
         {
             Title = "Winegarden", Shape = "rect", Coords = "443,325,467,343"
         },
         new MapCoordinateModel()
         {
             Title = "4-H Dairy Barn [ice cream]", Shape = "rect", Coords = "479,329,503,347"
         },
         new MapCoordinateModel()
         {
             Title = "Horse Show Rings", Shape = "rect", Coords = "362,75,386,93"
         },
         new MapCoordinateModel()
         {
             Title = "Horse Show Rings", Shape = "rect", Coords = "365,160,389,178"
         },
         new MapCoordinateModel()
         {
             Title = "RESTROOMS", Shape = "rect", Coords = "229,209,253,227"
         },
         new MapCoordinateModel()
         {
             Title = "ATM", Shape = "rect", Coords = "252,205,276,223"
         },
         new MapCoordinateModel()
         {
             Title = "Branchville Rotary Food Booth", Shape = "rect", Coords = "307,200,331,218"
         },
         new MapCoordinateModel()
         {
             Title = "INFORMATION BOOTHS", Shape = "rect", Coords = "401,211,425,229"
         },
         new MapCoordinateModel()
         {
             Title = "SECURITY", Shape = "rect", Coords = "423,203,447,221"
         },
         new MapCoordinateModel()
         {
             Title = "Horse Show Sponsor Pavilion", Shape = "rect", Coords = "400,83,424,101"
         },
         new MapCoordinateModel()
         {
             Title = "Horse Show Office", Shape = "rect", Coords = "426,81,450,99"
         },
         new MapCoordinateModel()
         {
             Title = "ATM", Shape = "rect", Coords = "447,97,471,115"
         },
         new MapCoordinateModel()
         {
             Title = "Handicapped Seating for Horse Show", Shape = "rect", Coords = "448,142,472,160"
         },
         new MapCoordinateModel()
         {
             Title = "Horse Show Rings", Shape = "rect", Coords = "541,88,565,106"
         },
         new MapCoordinateModel()
         {
             Title = "Horse Show Rings", Shape = "rect", Coords = "540,140,564,158"
         },
         new MapCoordinateModel()
         {
             Title = "Founders’ Park", Shape = "rect", Coords = "546,195,575,213"
         },
         new MapCoordinateModel()
         {
             Title = "Boy Scout Food Booth", Shape = "rect", Coords = "585,202,608,223"
         },
         new MapCoordinateModel()
         {
             Title = "Knights of Columbus Food Booth", Shape = "rect", Coords = "638,202,661,223"
         },
         new MapCoordinateModel()
         {
             Title = "Beer Tent", Shape = "rect", Coords = "653,182,676,203"
         },
         new MapCoordinateModel()
         {
             Title = "Miller Lite Outdoor Entertainment Area", Shape = "rect", Coords = "729,135,752,156"
         },
         new MapCoordinateModel()
         {
             Title = "Sussex County Farmers’ Market", Shape = "rect", Coords = "724,329,756,351"
         },
         new MapCoordinateModel()
         {
             Title = "20/33", Shape = "rect", Coords = "738,294,788,315"
         },
         new MapCoordinateModel()
         {
             Title = "Summer Blossoms Garden", Shape = "rect", Coords = "792,292,824,315"
         },
         new MapCoordinateModel()
         {
             Title = "Conservatory-Flower &amp; Garden Expo", Shape = "rect", Coords = "760,316,776,359"
         },
         new MapCoordinateModel()
         {
             Title = "Conservatory Courtyard &amp; Tent", Shape = "rect", Coords = "777,314,793,357"
         },
         new MapCoordinateModel()
         {
             Title = "Craft Beer Tent", Shape = "rect", Coords = "792,364,824,386"
         },
         new MapCoordinateModel()
         {
             Title = "Greenhouse- Forage &amp; Vegetable Show", Shape = "rect", Coords = "746,358,796,393"
         },
         new MapCoordinateModel()
         {
             Title = "INFORMATION BOOTHS", Shape = "rect", Coords = "126,227,141,241"
         },
         new MapCoordinateModel()
         {
             Title = "Parking", Shape = "rect", Coords = "62,259,85,379"
         },
         new MapCoordinateModel()
         {
             Title = "Carnival Wheel", Shape = "rect", Coords = "182,276,229,340"
         }
     };
 }
Example #32
0
    /// <summary>
    /// 作者:李宏图
    /// 日期:2014年01月08日
    /// </summary>
    public String selMobile(String SPID, String CustID, String Phone)
    {
        StringBuilder ResponseMsg = new StringBuilder();

        if (CommonUtility.IsEmpty(SPID))
        {
            ResponseMsg.Length = 0;
            if ("json".Equals(wt))
            {
                ResponseMsg.Append("{");
                ResponseMsg.AppendFormat("\"errcode\":\"{0}\",", "995");
                ResponseMsg.AppendFormat("\"errmsg\":\"{0}\"", "SPID不能为空!");
                ResponseMsg.Append("}");
            }
            else
            {
                ResponseMsg.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                ResponseMsg.Append("<PayPlatRequestParameter>");
                ResponseMsg.Append("<PARAMETERS>");
                ResponseMsg.AppendFormat("<ErrCode>{0}</ErrCode>", "995");
                ResponseMsg.AppendFormat("<ErrMsg>{0}</ErrMsg>", "SPID不能为空!");
                ResponseMsg.Append("</PARAMETERS>");
                ResponseMsg.Append("</PayPlatRequestParameter>");
            }
            return(ResponseMsg.ToString());
        }

        if (CommonUtility.IsEmpty(Phone))
        {
            ResponseMsg.Length = 0;
            if ("json".Equals(wt))
            {
                ResponseMsg.Append("{");
                ResponseMsg.AppendFormat("\"errcode\":\"{0}\",", "996");
                ResponseMsg.AppendFormat("\"errmsg\":\"{0}\"", "Phone不能为空!");
                ResponseMsg.Append("}");
            }
            else
            {
                ResponseMsg.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                ResponseMsg.Append("<PayPlatRequestParameter>");
                ResponseMsg.Append("<PARAMETERS>");
                ResponseMsg.AppendFormat("<ErrCode>{0}</ErrCode>", "996");
                ResponseMsg.AppendFormat("<ErrMsg>{0}</ErrMsg>", "Phone不能为空!");
                ResponseMsg.Append("</PARAMETERS>");
                ResponseMsg.Append("</PayPlatRequestParameter>");
            }
            return(ResponseMsg.ToString());
        }

        if (CommonUtility.IsEmpty(CustID))
        {
            ResponseMsg.Length = 0;
            if ("json".Equals(wt))
            {
                ResponseMsg.Append("{");
                ResponseMsg.AppendFormat("\"errcode\":\"{0}\",", "997");
                ResponseMsg.AppendFormat("\"errmsg\":\"{0}\"", "CustID不能为空!");
                ResponseMsg.Append("}");
            }
            else
            {
                ResponseMsg.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                ResponseMsg.Append("<PayPlatRequestParameter>");
                ResponseMsg.Append("<PARAMETERS>");
                ResponseMsg.AppendFormat("<ErrCode>{0}</ErrCode>", "997");
                ResponseMsg.AppendFormat("<ErrMsg>{0}</ErrMsg>", "CustID不能为空!");
                ResponseMsg.Append("</PARAMETERS>");
                ResponseMsg.Append("</PayPlatRequestParameter>");
            }
            return(ResponseMsg.ToString());
        }


        try
        {
            CustID = HttpUtility.HtmlDecode(Request.QueryString["CustID"]);
            Phone  = HttpUtility.HtmlDecode(Request.QueryString["Phone"]);                     // 手机号码
            SPID   = HttpUtility.HtmlDecode(Request.QueryString["SPID"]);
            int count = Convert.ToInt32(HttpUtility.HtmlDecode(Request.QueryString["count"])); // 发送次数



            ErrMsg = String.Empty;
            Result = PhoneBO.PhoneSel(CustID, Phone, out ErrMsg);    // 验证电话是否可以做认证电话(这里的电话包括手机和电话)
            // 0 代表可以做认证电话 否则 不可以
            if (Result == 0)
            {
                Random random     = new Random();
                string AuthenCode = random.Next(111111, 999999).ToString();
                CommonBizRules.SendMessageV3(Phone, "您在通过客户端绑定认证手机,验证码是:" + AuthenCode, SPID);
                int y = PhoneBO.InsertPhoneSendMassage(CustID, "您在通过客户端绑定认证手机,验证码是:", AuthenCode, Phone, DateTime.Now, "描述未知", count, 0, "1", out ErrMsg);
                ResponseMsg.Length = 0;
                if ("json".Equals(wt))
                {
                    ResponseMsg.Append("{");
                    ResponseMsg.AppendFormat("\"errcode\":\"{0}\",", "0");
                    ResponseMsg.AppendFormat("\"errmsg\":\"{0}\"", "您的验证码是:" + AuthenCode);
                    ResponseMsg.Append("}");
                }
                else
                {
                    ResponseMsg.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                    ResponseMsg.Append("<PayPlatRequestParameter>");
                    ResponseMsg.Append("<PARAMETERS>");
                    ResponseMsg.AppendFormat("<ErrCode>{0}</ErrCode>", "0");
                    ResponseMsg.AppendFormat("<ErrMsg>{0}</ErrMsg>", "您的验证码是:" + AuthenCode);
                    ResponseMsg.Append("</PARAMETERS>");
                    ResponseMsg.Append("</PayPlatRequestParameter>");
                }
                return(ResponseMsg.ToString());
            }
            else
            {
                ResponseMsg.Length = 0;
                if ("json".Equals(wt))
                {
                    ResponseMsg.Append("{");
                    ResponseMsg.AppendFormat("\"errcode\":\"{0}\",", Result);
                    ResponseMsg.AppendFormat("\"errmsg\":\"{0}\"", ErrMsg);
                    ResponseMsg.Append("}");
                }
                else
                {
                    ResponseMsg.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                    ResponseMsg.Append("<PayPlatRequestParameter>");
                    ResponseMsg.Append("<PARAMETERS>");
                    ResponseMsg.AppendFormat("<ErrCode>{0}</ErrCode>", Result);
                    ResponseMsg.AppendFormat("<ErrMsg>{0}</ErrMsg>", ErrMsg);
                    ResponseMsg.Append("</PARAMETERS>");
                    ResponseMsg.Append("</PayPlatRequestParameter>");
                }
                return(ResponseMsg.ToString());
            }
        }
        catch (Exception exp)
        {
            if ("json".Equals(wt))
            {
                ResponseMsg.Append("{");
                ResponseMsg.AppendFormat("\"errcode\":\"{0}\",", "-25367");
                ResponseMsg.AppendFormat("\"errmsg\":\"{0}\"", "异常:" + exp.ToString());
                ResponseMsg.Append("}");
            }
            else
            {
                ResponseMsg.Append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                ResponseMsg.Append("<PayPlatRequestParameter>");
                ResponseMsg.Append("<PARAMETERS>");
                ResponseMsg.AppendFormat("<ErrCode>{0}</ErrCode>", "-25367");
                ResponseMsg.AppendFormat("<ErrMsg>{0}</ErrMsg>", "异常:" + exp.ToString());
                ResponseMsg.Append("</PARAMETERS>");
                ResponseMsg.Append("</PayPlatRequestParameter>");
            }
            return(ResponseMsg.ToString());
        }
        return(ResponseMsg.ToString());
    }
 /// <summary>
 /// This renders short properties with DataAnnotations Attributes.
 /// </summary>
 /// <param name="column"></param>
 /// <param name="context"></param>
 /// <example>
 /// [Required(ErrorMessage = "Category Name is required.")]
 /// [StringLength(50, ErrorMessage = "Category Name must be between 1 and 50 characters.")]
 /// [DisplayName("Category Name")]
 /// public string CategoryName { get; set; }
 /// </example>
 public BusinessObjectsPropertyRenderDataAnnotationsForDbContext(MyMeta.IColumn column, RequestContext context)
     : base(column, context)
 {
     this._util = context.Utility;
     this._omitList = new string[0];
 }
        private async Task UploadFromMultiStreamAsync(IEnumerable <Stream> streamList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
#endif
        {
            CommonUtility.AssertNotNull("streamList", streamList);
            BlobRequestOptions modifiedOptions = BlobRequestOptions.ApplyDefaults(options, BlobType.BlockBlob, this.ServiceClient);

            operationContext = operationContext ?? new OperationContext();
            int           parallelOperations = modifiedOptions.ParallelOperationThreadCount.Value;
            List <string> blockList          = new List <string>();
            List <Task>   uploadTaskList     = new List <Task>();
            int           blockNum           = 0;

            progressIncrementer = progressIncrementer ?? AggregatingProgressIncrementer.None;

            foreach (Stream block in streamList)
            {
                if (uploadTaskList.Count == parallelOperations)
                {
                    // The await on WhenAny does not await on the upload task itself, hence exceptions must be repropagated.
                    await Task.WhenAny(uploadTaskList.ToArray()).ConfigureAwait(false);

                    uploadTaskList.RemoveAll(putBlockUpload =>
                    {
                        if (putBlockUpload.IsCompleted)
                        {
                            // If set, gets the AggregateException from the upload Task.
                            if (putBlockUpload.Exception != null)
                            {
                                throw putBlockUpload.Exception;
                            }

                            return(true);
                        }

                        return(false);
                    });
                }

                string blockId = Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Format("Block_{0}", (++blockNum).ToString("00000"))));
                blockList.Add(blockId);

                // Capture stream.
                Stream localBlock = block;

                try
                {
#if !WINDOWS_RT
                    Task uploadTask = this.PutBlockAsync(blockId, block, null, accessCondition, modifiedOptions, operationContext, progressIncrementer, cancellationToken);
#else
                    Task uploadTask = this.PutBlockAsync(blockId, block, null, accessCondition, modifiedOptions, operationContext, cancellationToken);
#endif
                    Task cleanupTask = uploadTask.ContinueWith(finishedUpload =>
                    {
                        localBlock.Dispose();
                    });

                    uploadTaskList.Add(uploadTask);
                }
                catch (Exception)
                {
                    // This is necessary in case an exception is thrown in PutBlockAsync before the continuation is registered.
                    localBlock.Dispose();
                    throw;
                }
            }

            await Task.WhenAll(uploadTaskList).ConfigureAwait(false);

            await this.PutBlockListAsync(blockList, accessCondition, modifiedOptions, operationContext, cancellationToken).ConfigureAwait(false);
        }