Exemple #1
0
 protected void btnsave_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(this.txtjingjiajg.Text))
     {
         MessageBox.Show(this, "请填写竞拍价格!");
         return;
     }
     else
     {
         decimal jbjg;
         try
         {
             jbjg = decimal.Parse(this.txtjingjiajg.Text);
         }
         catch { MessageBox.Show(this, "竞拍价格请填写数字"); return; }
         decimal jbdj = decimal.Parse(this.lbdijia.Text);
         if (jbdj > jbjg)
         {
             MessageBox.Show(this, "竞拍价格必须大于起价"); return;
         }
         DateTime dtjzsj = DateTime.Parse(this.lbjzsj.Text);
         if (DateTime.Now > dtjzsj)
         {
             MessageBox.Show(this, "竞价截止时间已到,不能继续竞价!");
             return;
         }
         NCPEP.Model.T_JBTWO jbmodel = new NCPEP.Model.T_JBTWO();
         jbmodel.bid  = Request.QueryString["st"];
         jbmodel.jbbs = "0";
         jbmodel.jbdj = this.lbdijia.Text;
         jbmodel.jbjg = this.txtjingjiajg.Text;
         NCPEP.Model.T_LiceTran tmodel = new NCPEP.Model.T_LiceTran();
         tmodel        = Session["jbyhm"] as NCPEP.Model.T_LiceTran;
         jbmodel.jbyhm = tmodel.JBYhm;
         jbmodel.tid   = tmodel.Id.ToString();
         jbmodel.zbzt  = "0";
         jbmodel.jbbs  = "2";
         NCPEP.Bll.T_JBTWO jbbll = new NCPEP.Bll.T_JBTWO();
         DataTable         dt    = jbbll.GetList(" jbbs='2' and bid='" + Request.QueryString["st"] + "' and tid='" + tmodel.Id + "' and jbyhm='" + tmodel.JBYhm + "'").Tables[0];
         if (dt.Rows.Count > 0)
         {
             foreach (DataRow item in dt.Rows)
             {
                 jbbll.Delete(int.Parse(item["sid"].ToString()));
             }
         }
         if (jbbll.Add(jbmodel) > 0)
         {
             MessageBox.ShowAndRedirect(this, "二次竞价成功!", "jbtwo-user.aspx");
             return;
         }
         else
         {
             MessageBox.Show(this, "竞价失败!请联系管理员"); return;
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string            strid    = Request.QueryString["p"];
                NCPEP.Bll.T_Bid   bllbid   = new NCPEP.Bll.T_Bid();
                NCPEP.Model.T_Bid modelbid = new NCPEP.Model.T_Bid();
                modelbid = bllbid.GetModel(int.Parse(strid));
                if (modelbid != null)
                {
                    NCPEP.Bll.T_LiceTran   bllli   = new NCPEP.Bll.T_LiceTran();
                    NCPEP.Model.T_LiceTran modelli = new NCPEP.Model.T_LiceTran();
                    modelli = bllli.GetModel(modelbid.FK_LiceTranId);
                    if (modelli != null)
                    {
                        NCPEP.Bll.T_IndicatorsRelations   bllin   = new NCPEP.Bll.T_IndicatorsRelations();
                        NCPEP.Model.T_IndicatorsRelations modelin = new NCPEP.Model.T_IndicatorsRelations();
                        DataTable dt     = bllin.GetList(" FK_MemberTypeCertificationId='" + modelli.MemberTypeId + "' and ApplicationType='3'").Tables[0];//出让方申请对应关系
                        string    strids = "";
                        foreach (DataRow dr in dt.Rows)
                        {
                            strids += dr["FK_TypeIndicatorNameId"].ToString() + ",";
                        }
                        strids = strids.Trim().TrimEnd(',');
                        NCPEP.Bll.T_UploadTypeIndicator bllup = new NCPEP.Bll.T_UploadTypeIndicator();
                        DataTable ddldt = new DataTable();
                        if (string.IsNullOrEmpty(strids))
                        {
                            MessageBox.Show(this, "没有对应的指标关系,请先设置对应的指标关系再进行上传!");
                            return;
                        }
                        ddldt = bllup.GetList(" id in(" + strids + ")").Tables[0];
                        if (ddldt.Rows.Count > 0)
                        {
                            this.txtFK_UploadTypeIndicatorId.DataSource     = ddldt;
                            this.txtFK_UploadTypeIndicatorId.DataTextField  = "TypeIndicatorName";
                            this.txtFK_UploadTypeIndicatorId.DataValueField = "id";
                            this.txtFK_UploadTypeIndicatorId.DataBind();
                        }
                    }
                }

                BindFujian(strid);
            }
        }
Exemple #3
0
        public void ProcessRequest(HttpContext context)
        {
            if (context.Session["jbyhm"] != null)
            {
                model = (NCPEP.Model.T_LiceTran)context.Session["jbyhm"];
            }
            string action     = context.Request.QueryString["action"].ToString();
            string returnDate = string.Empty;

            switch (action)
            {
            case "ycjbuser":
                //str = "\"total\":" + SumCount(context) + ",";
                returnDate = JsonHelper <Bid> .JsonDataTable(GetAllListByYCJBuser(context), "rows");

                break;

            default:
                returnDate = "请求错误!";
                break;
            }

            context.Response.Write(returnDate);
        }
Exemple #4
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public NCPEP.Model.T_LiceTran GetModel(int Id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 Id,FK_WebUserVeriId,LiceTranType,OrgCode,MemberTypeId,Name,Addr,Contact,Corporate,IDCard,OrganizationCode,Tel,Owner,Capital,ApplyDate,AuditType,JBYhm,JBmm from T_LiceTran ");
            strSql.Append(" where Id=@Id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Id", SqlDbType.Int, 4)
            };
            parameters[0].Value = Id;

            NCPEP.Model.T_LiceTran model = new NCPEP.Model.T_LiceTran();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
Exemple #5
0
        protected void Jzs()
        {
            if (Request.QueryString["p"] != null)
            {
                NCPEP.Bll.T_Bid   bllbid   = new NCPEP.Bll.T_Bid();
                NCPEP.Model.T_Bid modelbid = new NCPEP.Model.T_Bid();
                try
                {
                    modelbid = bllbid.GetModel(int.Parse(Request.QueryString["p"]));
                }
                catch { }
                if (modelbid != null)
                {
                    NCPEP.Bll.T_LiceTran   blltr   = new NCPEP.Bll.T_LiceTran();
                    NCPEP.Model.T_LiceTran modeltr = new NCPEP.Model.T_LiceTran();
                    try
                    {
                        modeltr = blltr.GetModel(modelbid.FK_LiceTranId);
                    }
                    catch { }
                    try
                    {
                        //  lbnjz.Text = System.DateTime.Now.Year.ToString();
                    }
                    catch { }
                    try
                    {
                        lbjycp.Text = modelbid.BidName;
                    }
                    catch { }
                    //try
                    //{
                    //    lbxmbh.Text = "HJNJ" + modelbid.Admissibility;
                    //}
                    //catch { }
                    try
                    {
                        //鉴证书号码
                        lbxmbh.Text = "HJNJ" + modelbid.NoAssurance;
                    }
                    catch { }
                    try
                    {
                        this.lbzcf.Text = modeltr.Owner;
                    }
                    catch { }
                    try
                    {
                        this.lbsyqr.Text = modeltr.Name;
                    }
                    catch { }
                    NCPEP.Bll.T_MemberTypeCertification   bllmem   = new NCPEP.Bll.T_MemberTypeCertification();
                    NCPEP.Model.T_MemberTypeCertification modelmem = new NCPEP.Model.T_MemberTypeCertification();
                    try
                    {
                        modelmem = bllmem.GetModel(modeltr.MemberTypeId);
                    }
                    catch { }
                    if (modelmem != null)
                    {
                        this.lbzcxwpzjg.Text = modelmem.TypeCertificationName;
                    }
                    // this.lbzcxwpzjg.Text = modeltr.MemberTypeId;
                    try
                    {
                        //转出方资本
                        this.lbzcfdb.Text = modeltr.Capital;
                    }
                    catch { }
                    try
                    {
                        this.lbzcfsfz.Text = modeltr.IDCard;
                    }
                    catch { }
                    try
                    {
                        this.lbcqlx.Text = modelbid.Properties;
                    }
                    catch { }
                    NCPEP.Bll.T_PropertyType   bllpro   = new NCPEP.Bll.T_PropertyType();
                    NCPEP.Model.T_PropertyType modelpro = new NCPEP.Model.T_PropertyType();
                    try
                    {
                        modelpro = bllpro.GetModel(int.Parse(lbcqlx.Text));
                        if (modelpro != null)
                        {
                            this.lbcqlx.Text = modelpro.PropertyTypeName;
                        }
                    }
                    catch { }

                    NCPEP.Bll.T_BidTrans blltrans = new NCPEP.Bll.T_BidTrans();
                    DataTable            dt       = blltrans.GetList("FK_BidId='" + modelbid.Id + "'").Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                        modeltr = new NCPEP.Model.T_LiceTran();
                        try
                        {
                            modeltr = blltr.GetModel(int.Parse(dt.Rows[0]["FK_LiceTranId"].ToString()));
                        }
                        catch { }
                        if (modeltr != null)
                        {
                            try
                            {
                                lbsrf.Text = modeltr.Name;
                            }
                            catch { }
                            try
                            {
                                lbsrffddbr.Text = modeltr.Owner;
                            }
                            catch { }
                            try
                            {
                                modelmem = new NCPEP.Model.T_MemberTypeCertification();
                            }
                            catch { }
                            try
                            {
                                modelmem = bllmem.GetModel(modeltr.MemberTypeId);
                            }
                            catch { }
                            if (modelmem != null)
                            {
                                lbgsxz.Text = modelmem.TypeCertificationName;
                            }
                            try
                            {
                                lbzczb.Text = modeltr.Capital;
                            }
                            catch { }
                            try
                            {
                                lbsrfsfz.Text = modeltr.IDCard;
                            }
                            catch { }
                        }
                    }
                    try
                    {
                        lbbdjbqk.Text = modelbid.BidBasic;
                        //lbzcqx.Text = "自" + DateTime.Parse(modelbid.StartDate.ToString()).ToString("yyyy年MM月dd日") + "起  至" + DateTime.Parse(modelbid.EndDate.ToString()).ToString("yyyy年MM月dd日") + "止";
                    }
                    catch { }
                    try
                    {
                        //批准机构
                        lbqqjg.Text = modelbid.FeedingMechanism;
                    }
                    catch { }
                    try
                    {
                        lbguimo.Text = modelbid.guimo + modelbid.danwei;
                    }
                    catch { }

                    NCPEP.Bll.T_TurnOutType   bllout   = new NCPEP.Bll.T_TurnOutType();
                    NCPEP.Model.T_TurnOutType modelout = new NCPEP.Model.T_TurnOutType();
                    try
                    {
                        modelout = bllout.GetModel(int.Parse(modelbid.TurnOut.ToString()));
                    }
                    catch { }
                    if (modelout != null)
                    {
                        try
                        {
                            lbzcfs.Text = modelout.TurnOutTypeName;
                        }
                        catch { }
                    }
                    else
                    {
                        try
                        {
                            lbzcfs.Text = modelbid.TurnOut.ToString();//转出方式
                        }
                        catch { }
                    }
                    //交易单价
                    try
                    {
                        lbjydj.Text = modelbid.ListingPrice;
                    }
                    catch { }
                    DataTable dts = new DataTable();
                    try
                    {
                        dts = DbHelperSQL.Query("select * from T_StandardMode where id='" + modelbid.StandardMode + "'").Tables[0];
                        if (dts.Rows.Count > 0)
                        {
                            lbjyfs.Text = dts.Rows[0]["StandardModeName"].ToString();
                        }
                    }
                    catch { lbjyfs.Text = ""; }

                    DataTable       dtjzs  = new DataTable();
                    NCPEP.Bll.T_Jzs blljzs = new NCPEP.Bll.T_Jzs();
                    dtjzs = blljzs.GetList("binid='" + modelbid.Id + "'").Tables[0];
                    if (dtjzs.Rows.Count > 0)
                    {
                        lbcjje.Text   = dtjzs.Rows[0]["cjje"].ToString();
                        lbhtbh.Text   = dtjzs.Rows[0]["htbh"].ToString();
                        lbbeizhu.Text = dtjzs.Rows[0]["beizhu"].ToString();
                        try
                        {
                            //转出期限
                            lbzcqx.Text = "自" + DateTime.Parse(dtjzs.Rows[0]["zcdate"].ToString()).ToString("yyyy年MM月dd日") + "起至" + DateTime.Parse(dtjzs.Rows[0]["zcdatez"].ToString()).ToString("yyyy年MM月dd日") + "止";
                        }
                        catch { }
                        try
                        {
                            //支付方式
                            lbhtqsrq.Text = dtjzs.Rows[0]["beiyong"].ToString();
                        }
                        catch { }
                        //交易单价
                        try
                        {
                            lbjydj.Text = dtjzs.Rows[0]["beiyong2"].ToString();
                        }
                        catch { }
                        try
                        {
                            //转出开始时间+3天变成打印时间
                            DateTime dysj = DateTime.Parse(dtjzs.Rows[0]["zcdate"].ToString());
                            if (dysj.Day != System.DateTime.Now.Day && dysj.Month != System.DateTime.Now.Month && dysj.Month != System.DateTime.Now.Year)
                            {
                                lbnian.Text = dysj.AddDays(3).Year.ToString();
                                lbyue.Text  = dysj.AddDays(3).Month.ToString();
                                lbri.Text   = dysj.AddDays(3).Day.ToString();
                            }
                            else
                            {
                                lbnian.Text = System.DateTime.Now.Year.ToString();
                                lbyue.Text  = System.DateTime.Now.Month.ToString();
                                lbri.Text   = System.DateTime.Now.Day.ToString();
                            }
                        }
                        catch { }
                    }
                }
            }
        }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //dynamic adminUser = null;
            //try
            //{
            //    adminUser = Session["SuperAdminUserSession"] as AdminUser;
            //    if (null == adminUser)
            //    {
            //        if (!string.IsNullOrEmpty(Request.Cookies["AdminCookies"].Value))
            //        {
            //            adminUser = new GetUserCookiesPlug().GetUserCookies(Request.Cookies["AdminCookies"]["SuperAdminUserSession"]);
            //            Session["SuperAdminUserSession"] = adminUser;

            //        }
            //    }
            //}
            //catch
            //{
            //    adminUser = null;
            //}
            //if (null == adminUser)
            //{
            //    ClientScript.RegisterClientScriptBlock(this.GetType(), "reload", " <script>parent.location.reload();</script>");
            //}
            if (Request.QueryString["p"] != null)
            {
                #region 鉴证书预览
                Jzs();
                #endregion
                NCPEP.Bll.T_Bid   bllbid   = new NCPEP.Bll.T_Bid();
                NCPEP.Model.T_Bid modelbid = new NCPEP.Model.T_Bid();
                modelbid = bllbid.GetModel(int.Parse(Request.QueryString["p"]));
                if (modelbid != null)
                {
                    NCPEP.Bll.T_Organization   bllorg   = new NCPEP.Bll.T_Organization();
                    NCPEP.Model.T_Organization modelorg = new NCPEP.Model.T_Organization();
                    modelorg = bllorg.GetModel(modelbid.OrgCode);
                    if (modelorg != null)
                    {
                        //组织单位
                        this.lbzzdw.Text = modelorg.OrgName;
                    }
                    //产权名称
                    lbcqmc.Text = modelbid.BidName;
                    //产权类型
                    lbchanquanleixing.Text = modelbid.Properties;
                    NCPEP.Bll.T_PropertyType   bllpro   = new NCPEP.Bll.T_PropertyType();
                    NCPEP.Model.T_PropertyType modelpro = new NCPEP.Model.T_PropertyType();
                    modelpro = bllpro.GetModel(int.Parse(modelbid.Properties));
                    if (modelpro != null)
                    {
                        lbchanquanleixing.Text = modelpro.PropertyTypeName;
                    }
                    //产权权属
                    lbchanquanquanshu.Text = modelbid.Ownership;
                    //标的规模
                    lbbiaodeguimo.Text = modelbid.guimo;
                    //出让方
                    lbchurangfang.Text = modelbid.FK_LiceTranId.ToString();

                    NCPEP.Bll.T_LiceTran   blltr                 = new NCPEP.Bll.T_LiceTran();
                    NCPEP.Model.T_LiceTran modeltr               = new NCPEP.Model.T_LiceTran();
                    NCPEP.Bll.T_MemberTypeCertification   bllm   = new NCPEP.Bll.T_MemberTypeCertification();
                    NCPEP.Model.T_MemberTypeCertification modelm = new NCPEP.Model.T_MemberTypeCertification();
                    modeltr = blltr.GetModel(modelbid.FK_LiceTranId);
                    if (modeltr != null)
                    {
                        lbchurangfang.Text = modeltr.Name;
                        //出让方性质
                        lbchurangfangxingzhi.Text = modeltr.MemberTypeId.ToString();

                        modelm = bllm.GetModel(modeltr.MemberTypeId);
                        lbchurangfangxingzhi.Text = modelm.TypeCertificationName;
                        #region 出让方信息
                        modelorg        = new NCPEP.Model.T_Organization();
                        modelorg        = bllorg.GetModel(modeltr.OrgCode);
                        lbzzdw_crf.Text = modelorg.OrgName;
                        lbjjlx_crf.Text = bllm.GetModel(modeltr.MemberTypeId).TypeCertificationName;
                        lbxm_crf.Text   = modeltr.Name;
                        lbzz_crf.Text   = modeltr.Addr;
                        lblxr_crf.Text  = modeltr.Contact;
                        lbfrdb_crf.Text = modeltr.Corporate;
                        lbsfz_crf.Text  = modeltr.IDCard;
                        lblxdh_crf.Text = modeltr.Tel;
                        lbsyqr_crf.Text = modeltr.Owner;
                        lbzzjg_crf.Text = modeltr.OrganizationCode;
                        lbzczb_crf.Text = modeltr.Capital;
                        #endregion
                    }
                    //受让方
                    lbshourangfang.Text = "";
                    NCPEP.Bll.T_BidTrans blltrans = new NCPEP.Bll.T_BidTrans();
                    DataTable            dt       = blltrans.GetList("FK_BidId='" + modelbid.Id + "'").Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                        modeltr = new NCPEP.Model.T_LiceTran();
                        try
                        {
                            modeltr = blltr.GetModel(int.Parse(dt.Rows[0]["FK_LiceTranId"].ToString()));
                        }
                        catch { }
                        if (modeltr != null)
                        {
                            try
                            {
                                //受让方
                                lbshourangfang.Text = modeltr.Name;
                            }
                            catch { }
                            try
                            {
                                //受让性质
                                lbshourangfangxingzhi.Text = modeltr.Owner;
                            }
                            catch { }
                            #region 受让方详细信息
                            modelorg        = new NCPEP.Model.T_Organization();
                            modelorg        = bllorg.GetModel(modeltr.OrgCode);
                            lbzzdw_srf.Text = modelorg.OrgName;
                            lbjjlx_srf.Text = bllm.GetModel(modeltr.MemberTypeId).TypeCertificationName;
                            lbxm_srf.Text   = modeltr.Name;
                            lbzz_srf.Text   = modeltr.Addr;
                            lblxr_srf.Text  = modeltr.Contact;
                            lbfrdb_srf.Text = modeltr.Corporate;
                            lbsfz_srf.Text  = modeltr.IDCard;
                            lblxdh_srf.Text = modeltr.Tel;
                            lbsyqr_srf.Text = modeltr.Owner;
                            lbzzjg_srf.Text = modeltr.OrganizationCode;
                            lbzczb_srf.Text = modeltr.Capital;
                            #endregion
                        }
                    }
                    //交易方式
                    lbjiaoyifangshi.Text = "";
                    DataTable dts = new DataTable();
                    try
                    {
                        dts = DbHelperSQL.Query("select * from T_StandardMode where id='" + modelbid.StandardMode + "'").Tables[0];
                        if (dts.Rows.Count > 0)
                        {
                            lbjiaoyifangshi.Text = dts.Rows[0]["StandardModeName"].ToString();
                        }
                    }
                    catch { lbjiaoyifangshi.Text = ""; }
                    NCPEP.Bll.T_Jzs blljzs = new NCPEP.Bll.T_Jzs();
                    DataTable       dtjzs  = blljzs.GetList("binid='" + modelbid.Id + "'").Tables[0];
                    if (dtjzs.Rows.Count > 0)
                    {
                        //合同起始日期
                        lbqishiriqi.Text = "自" + DateTime.Parse(dtjzs.Rows[0]["zcdate"].ToString()).ToString("yyyy年MM月dd日") + "起至" + DateTime.Parse(dtjzs.Rows[0]["zcdatez"].ToString()).ToString("yyyy年MM月dd日") + "止";
                        try
                        {
                            lbchengjiaodanjia.Text = dtjzs.Rows[0]["beiyong2"].ToString();
                        }
                        catch { }
                        try
                        {
                            //成交总价
                            lbchengjiaozongjia.Text = dtjzs.Rows[0]["cjje"].ToString();
                        }
                        catch { }
                        try
                        {
                            //支付方式
                            lbzhifufangshi.Text = dtjzs.Rows[0]["beiyong"].ToString();
                        }
                        catch { }
                        try
                        {
                            //备注
                            lbbeizhu2.Text = dtjzs.Rows[0]["beizhu"].ToString();
                        }
                        catch { }
                    }
                }
            }
        }
Exemple #7
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(NCPEP.Model.T_LiceTran model)
 {
     return(dal.Update(model));
 }
Exemple #8
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(NCPEP.Model.T_LiceTran model)
 {
     return(dal.Add(model));
 }
Exemple #9
0
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public NCPEP.Model.T_LiceTran DataRowToModel(DataRow row)
 {
     NCPEP.Model.T_LiceTran model = new NCPEP.Model.T_LiceTran();
     if (row != null)
     {
         if (row["Id"] != null && row["Id"].ToString() != "")
         {
             model.Id = int.Parse(row["Id"].ToString());
         }
         if (row["FK_WebUserVeriId"] != null && row["FK_WebUserVeriId"].ToString() != "")
         {
             model.FK_WebUserVeriId = int.Parse(row["FK_WebUserVeriId"].ToString());
         }
         if (row["LiceTranType"] != null && row["LiceTranType"].ToString() != "")
         {
             model.LiceTranType = int.Parse(row["LiceTranType"].ToString());
         }
         if (row["OrgCode"] != null)
         {
             model.OrgCode = row["OrgCode"].ToString();
         }
         if (row["MemberTypeId"] != null && row["MemberTypeId"].ToString() != "")
         {
             model.MemberTypeId = int.Parse(row["MemberTypeId"].ToString());
         }
         if (row["Name"] != null)
         {
             model.Name = row["Name"].ToString();
         }
         if (row["Addr"] != null)
         {
             model.Addr = row["Addr"].ToString();
         }
         if (row["Contact"] != null)
         {
             model.Contact = row["Contact"].ToString();
         }
         if (row["Corporate"] != null)
         {
             model.Corporate = row["Corporate"].ToString();
         }
         if (row["IDCard"] != null)
         {
             model.IDCard = row["IDCard"].ToString();
         }
         if (row["OrganizationCode"] != null)
         {
             model.OrganizationCode = row["OrganizationCode"].ToString();
         }
         if (row["Tel"] != null)
         {
             model.Tel = row["Tel"].ToString();
         }
         if (row["Owner"] != null)
         {
             model.Owner = row["Owner"].ToString();
         }
         if (row["Capital"] != null)
         {
             model.Capital = row["Capital"].ToString();
         }
         if (row["ApplyDate"] != null && row["ApplyDate"].ToString() != "")
         {
             model.ApplyDate = DateTime.Parse(row["ApplyDate"].ToString());
         }
         if (row["AuditType"] != null && row["AuditType"].ToString() != "")
         {
             model.AuditType = int.Parse(row["AuditType"].ToString());
         }
         if (row["JBYhm"] != null)
         {
             model.JBYhm = row["JBYhm"].ToString();
         }
         if (row["JBmm"] != null)
         {
             model.JBmm = row["JBmm"].ToString();
         }
     }
     return(model);
 }
Exemple #10
0
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(NCPEP.Model.T_LiceTran model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_LiceTran set ");
            strSql.Append("FK_WebUserVeriId=@FK_WebUserVeriId,");
            strSql.Append("LiceTranType=@LiceTranType,");
            strSql.Append("OrgCode=@OrgCode,");
            strSql.Append("MemberTypeId=@MemberTypeId,");
            strSql.Append("Name=@Name,");
            strSql.Append("Addr=@Addr,");
            strSql.Append("Contact=@Contact,");
            strSql.Append("Corporate=@Corporate,");
            strSql.Append("IDCard=@IDCard,");
            strSql.Append("OrganizationCode=@OrganizationCode,");
            strSql.Append("Tel=@Tel,");
            strSql.Append("Owner=@Owner,");
            strSql.Append("Capital=@Capital,");
            strSql.Append("ApplyDate=@ApplyDate,");
            strSql.Append("AuditType=@AuditType,");
            strSql.Append("JBYhm=@JBYhm,");
            strSql.Append("JBmm=@JBmm");
            strSql.Append(" where Id=@Id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@FK_WebUserVeriId", SqlDbType.Int,         4),
                new SqlParameter("@LiceTranType",     SqlDbType.Int,         4),
                new SqlParameter("@OrgCode",          SqlDbType.NVarChar,  100),
                new SqlParameter("@MemberTypeId",     SqlDbType.Int,         4),
                new SqlParameter("@Name",             SqlDbType.NVarChar,  100),
                new SqlParameter("@Addr",             SqlDbType.NVarChar,  100),
                new SqlParameter("@Contact",          SqlDbType.NVarChar,  100),
                new SqlParameter("@Corporate",        SqlDbType.NVarChar,  100),
                new SqlParameter("@IDCard",           SqlDbType.NVarChar,  100),
                new SqlParameter("@OrganizationCode", SqlDbType.NVarChar,  100),
                new SqlParameter("@Tel",              SqlDbType.NVarChar,  100),
                new SqlParameter("@Owner",            SqlDbType.NVarChar,  100),
                new SqlParameter("@Capital",          SqlDbType.NVarChar,  100),
                new SqlParameter("@ApplyDate",        SqlDbType.DateTime),
                new SqlParameter("@AuditType",        SqlDbType.Int,         4),
                new SqlParameter("@JBYhm",            SqlDbType.VarChar,    50),
                new SqlParameter("@JBmm",             SqlDbType.NVarChar,   50),
                new SqlParameter("@Id",               SqlDbType.Int, 4)
            };
            parameters[0].Value  = model.FK_WebUserVeriId;
            parameters[1].Value  = model.LiceTranType;
            parameters[2].Value  = model.OrgCode;
            parameters[3].Value  = model.MemberTypeId;
            parameters[4].Value  = model.Name;
            parameters[5].Value  = model.Addr;
            parameters[6].Value  = model.Contact;
            parameters[7].Value  = model.Corporate;
            parameters[8].Value  = model.IDCard;
            parameters[9].Value  = model.OrganizationCode;
            parameters[10].Value = model.Tel;
            parameters[11].Value = model.Owner;
            parameters[12].Value = model.Capital;
            parameters[13].Value = model.ApplyDate;
            parameters[14].Value = model.AuditType;
            parameters[15].Value = model.JBYhm;
            parameters[16].Value = model.JBmm;
            parameters[17].Value = model.Id;

            int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }