/// <summary> /// 信息结果页面的上传(EnterpriseRegisterResult.aspx) /// </summary> public void AddFromResult(Tz888.Model.MemberResourceModel model) { int rowsAffected; SqlParameter[] parameters = { new SqlParameter("@ResourceID", SqlDbType.Int, 8), new SqlParameter("@LoginName", SqlDbType.Char, 16), new SqlParameter("@ResourceName", SqlDbType.VarChar, 100), new SqlParameter("@ResourceTitle", SqlDbType.VarChar, 50), new SqlParameter("@ResourceDescrib", SqlDbType.VarChar, 1000), new SqlParameter("@ResourceType", SqlDbType.SmallInt, 2), new SqlParameter("@ResourceAddr", SqlDbType.VarChar, 300), new SqlParameter("@ResourceProperty", SqlDbType.SmallInt, 2), new SqlParameter("@ResourcePassword", SqlDbType.Binary, 1), new SqlParameter("@UpDate", SqlDbType.DateTime), new SqlParameter("@IsDel", SqlDbType.Bit, 1), new SqlParameter("@remark", SqlDbType.VarChar, 100) }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.LoginName; parameters[2].Value = model.ResourceName; parameters[3].Value = model.ResourceTitle; parameters[4].Value = model.ResourceDescrib; parameters[5].Value = model.ResourceType; parameters[6].Value = model.ResourceAddr; parameters[7].Value = model.ResourceProperty; parameters[8].Value = model.ResourcePassword; parameters[9].Value = model.UpDate; parameters[10].Value = model.IsDel; parameters[11].Value = model.remark; DbHelperSQL.RunProcedure("UP_MemberResourceTab_ADD", parameters, out rowsAffected); }
protected void Button1_Click(object sender, EventArgs e) { Tz888.SQLServerDAL.MemberResourceDAL objSendImage = new Tz888.SQLServerDAL.MemberResourceDAL(); Tz888.Model.MemberResourceModel ResourceModel = new Tz888.Model.MemberResourceModel(); //保存上传图片 string[] UploadImgFileName = SaveImages(this.InfoType); string Pic1 = ""; if (UploadImgFileName.Length > 0) { Pic1 = UploadImgFileName[0]; //图片加载 this.Img = ConfigurationManager.AppSettings["ImageDomain"].ToString() + "/" + Pic1; this.ButtonName = ""; //图片上传 ResourceModel.ResourceID = 0; ResourceModel.LoginName = Page.User.Identity.Name; ResourceModel.ResourceName = "登记介绍"; ResourceModel.ResourceTitle = "登记介绍"; ResourceModel.ResourceDescrib = "登记介绍"; ResourceModel.ResourceType = 1; ResourceModel.ResourceAddr = Pic1; ResourceModel.ResourceProperty = 0; ResourceModel.ResourcePassword = null;// Convert.ToByte(""); ResourceModel.UpDate = DateTime.Now; ResourceModel.IsDel = false; ResourceModel.remark = "Result.aspx页面添加"; objSendImage.AddFromResult(ResourceModel); Tz888.Common.MessageBox.Show(this.Page, "上传成功!"); } }
/// <summary> /// 添加会员认证 /// </summary> /// <param name="model"></param> /// <returns></returns> public bool AddMemberCert(Tz888.Model.MemberResourceModel model) { SqlParameter[] parameters = { new SqlParameter("@ResourceID", SqlDbType.Int, 8), new SqlParameter("@LoginName", SqlDbType.Char, 16), new SqlParameter("@ResourceName", SqlDbType.VarChar, 100), new SqlParameter("@ResourceTitle", SqlDbType.VarChar, 50), new SqlParameter("@ResourceDescrib", SqlDbType.VarChar, 1000), new SqlParameter("@ResourceType", SqlDbType.SmallInt, 2), new SqlParameter("@ResourceAddr", SqlDbType.VarChar, 300), new SqlParameter("@ResourceProperty", SqlDbType.SmallInt, 2), new SqlParameter("@ResourcePassword", SqlDbType.Binary, 1), new SqlParameter("@remark", SqlDbType.VarChar, 100) }; parameters[0].Direction = ParameterDirection.Output; parameters[1].Value = model.LoginName; parameters[2].Value = model.ResourceName; parameters[3].Value = model.ResourceTitle; parameters[4].Value = model.ResourceDescrib; parameters[5].Value = model.ResourceType; parameters[6].Value = model.ResourceAddr; parameters[7].Value = model.ResourceProperty; parameters[8].Value = model.ResourcePassword; parameters[9].Value = model.remark; bool b = DbHelperSQL.RunProcLob("MemberCertInsert", parameters); return(b); }
/// <summary> /// 获取指定所有登记图片信息 /// </summary> /// <param name="InfoID"></param> /// <returns></returns> public List <Tz888.Model.MemberResourceModel> GetModelList(string LoginName, int ResourceProperty) { List <Tz888.Model.MemberResourceModel> lists = new List <Tz888.Model.MemberResourceModel>(); SqlParameter[] parameters = { new SqlParameter("@LoginName", SqlDbType.Char, 20), new SqlParameter("@ResourceProperty", SqlDbType.Int) }; parameters[0].Value = LoginName; parameters[1].Value = ResourceProperty; DataSet ds = DbHelperSQL.RunProcedure("UP_MemberResourceTab_GetAllList", parameters, "ds"); if (ds == null || ds.Tables[0].Rows.Count == 0) { return(null); } for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Tz888.Model.MemberResourceModel model = new Tz888.Model.MemberResourceModel(); model.LoginName = ds.Tables[0].Rows[0]["LoginName"].ToString(); model.ResourceName = ds.Tables[0].Rows[0]["ResourceName"].ToString(); model.ResourceTitle = ds.Tables[0].Rows[0]["ResourceTitle"].ToString(); model.ResourceDescrib = ds.Tables[0].Rows[0]["ResourceDescrib"].ToString(); if (ds.Tables[0].Rows[0]["ResourceType"].ToString() != "") { model.ResourceType = int.Parse(ds.Tables[0].Rows[0]["ResourceType"].ToString()); } model.ResourceAddr = ds.Tables[0].Rows[0]["ResourceAddr"].ToString(); if (ds.Tables[0].Rows[0]["ResourceProperty"].ToString() != "") { model.ResourceProperty = int.Parse(ds.Tables[0].Rows[0]["ResourceProperty"].ToString()); } if (ds.Tables[0].Rows[0]["UpDate"].ToString() != "") { model.UpDate = DateTime.Parse(ds.Tables[0].Rows[0]["UpDate"].ToString()); } if (ds.Tables[0].Rows[0]["IsDel"].ToString() != "") { if ((ds.Tables[0].Rows[0]["IsDel"].ToString() == "1") || (ds.Tables[0].Rows[0]["IsDel"].ToString().ToLower() == "true")) { model.IsDel = true; } else { model.IsDel = false; } } model.remark = ds.Tables[0].Rows[0]["remark"].ToString(); lists.Add(model); } return(lists); }
////////////////////////////////////////////////////////////////////////// private void CheckUsrRes() { Tz888.BLL.MemberResourceBLL res = new MemberResourceBLL(); Tz888.Model.MemberResourceModel resModel = res.GetModel(LoginName); if (resModel == null && Page.User.IsInRole("GT1002")) { this.forSite.InnerHtml += "您还有一些重要的公司资料没有上传,无法让客户完全信任您。点此" + "<a href='Register/EnterpriseRegister_additive.aspx' class='blue'>完善公司资料</a><br>"; } }
/// <summary> /// 得到一个对象实体 /// </summary> public Tz888.Model.MemberResourceModel GetModel(string LoginName) { SqlParameter[] parameters = { new SqlParameter("@LoginName", SqlDbType.Char, 20) }; parameters[0].Value = LoginName; Tz888.Model.MemberResourceModel model = new Tz888.Model.MemberResourceModel(); DataSet ds = DbHelperSQL.RunProcedure("UP_MemberResourceTab_GetModel", parameters, "ds"); if (ds.Tables[0].Rows.Count > 0) { model.LoginName = ds.Tables[0].Rows[0]["LoginName"].ToString(); model.ResourceName = ds.Tables[0].Rows[0]["ResourceName"].ToString(); model.ResourceTitle = ds.Tables[0].Rows[0]["ResourceTitle"].ToString(); model.ResourceDescrib = ds.Tables[0].Rows[0]["ResourceDescrib"].ToString(); if (ds.Tables[0].Rows[0]["ResourceType"].ToString() != "") { model.ResourceType = int.Parse(ds.Tables[0].Rows[0]["ResourceType"].ToString()); } model.ResourceAddr = ds.Tables[0].Rows[0]["ResourceAddr"].ToString(); if (ds.Tables[0].Rows[0]["ResourceProperty"].ToString() != "") { model.ResourceProperty = int.Parse(ds.Tables[0].Rows[0]["ResourceProperty"].ToString()); } if (ds.Tables[0].Rows[0]["UpDate"].ToString() != "") { model.UpDate = DateTime.Parse(ds.Tables[0].Rows[0]["UpDate"].ToString()); } if (ds.Tables[0].Rows[0]["IsDel"].ToString() != "") { if ((ds.Tables[0].Rows[0]["IsDel"].ToString() == "1") || (ds.Tables[0].Rows[0]["IsDel"].ToString().ToLower() == "true")) { model.IsDel = true; } else { model.IsDel = false; } } model.remark = ds.Tables[0].Rows[0]["remark"].ToString(); return(model); } else { return(null); } }
protected void UpLoadImage(Tz888.Model.MemberResourceModel UpLoadImage) { Tz888.SQLServerDAL.MemberResourceDAL objSendImage = new Tz888.SQLServerDAL.MemberResourceDAL(); Tz888.Model.MemberResourceModel ResourceModel = new Tz888.Model.MemberResourceModel(); //保存进数据库 ResourceModel.ResourceID = 0; ResourceModel.LoginName = UpLoadImage.LoginName; ResourceModel.ResourceName = UpLoadImage.ResourceName; ResourceModel.ResourceTitle = UpLoadImage.ResourceTitle; ResourceModel.ResourceDescrib = UpLoadImage.ResourceDescrib; ResourceModel.ResourceType = UpLoadImage.ResourceType; ResourceModel.ResourceAddr = UpLoadImage.ResourceAddr; ResourceModel.ResourceProperty = UpLoadImage.ResourceProperty; ResourceModel.ResourcePassword = null; ResourceModel.UpDate = DateTime.Now; ResourceModel.IsDel = false; ResourceModel.remark = "附件添加"; objSendImage.AddFromResult(ResourceModel); }
protected void btSend_Click(object sender, EventArgs e) { #region 营业执照fuYYZZ string[] YYZZName = fuYYZZ.SaveImages("EnterpriseRegister"); string PicYYZZ = ""; if (YYZZName.Length > 0) { modelYYZZ = new Tz888.Model.MemberResourceModel(); PicYYZZ = YYZZName[0]; modelYYZZ.ResourceID = 0; modelYYZZ.LoginName = Page.User.Identity.Name.Trim(); modelYYZZ.ResourceName = "营业执照"; modelYYZZ.ResourceTitle = "营业执照"; modelYYZZ.ResourceDescrib = "营业执照"; //资源介绍 modelYYZZ.ResourceType = 1; //资源类型 modelYYZZ.ResourceAddr = PicYYZZ; modelYYZZ.ResourceProperty = 1; //资源性质 modelYYZZ.ResourcePassword = null; //资源密码 modelYYZZ.UpDate = DateTime.Now; //上传日期 modelYYZZ.IsDel = false; //是否删除 modelYYZZ.remark = "营业执照"; UpLoadImage(modelYYZZ); } #endregion #region 税务登记证(国税)fuGS string[] GSName = fuGS.SaveImages("EnterpriseRegister"); string PicGS = ""; if (GSName.Length > 0) { modelGS = new Tz888.Model.MemberResourceModel(); PicGS = GSName[0]; modelGS.ResourceID = 0; modelGS.LoginName = Page.User.Identity.Name.Trim(); modelGS.ResourceName = "税务登记证(国税)"; modelGS.ResourceTitle = "国税"; modelGS.ResourceDescrib = "税务登记证(国税)"; //资源介绍 modelGS.ResourceType = 1; //资源类型 modelGS.ResourceAddr = PicGS; modelGS.ResourceProperty = 2; //资源性质 modelGS.ResourcePassword = null; //资源密码 modelGS.UpDate = DateTime.Now; //上传日期 modelGS.IsDel = false; //是否删除 modelGS.remark = "税务登记证(国税)"; UpLoadImage(modelGS); } #endregion #region 税务登记证(地税)fuDS string[] DSName = fuDS.SaveImages("EnterpriseRegister"); string PicDS = ""; if (DSName.Length > 0) { modelDS = new Tz888.Model.MemberResourceModel(); PicDS = DSName[0]; modelDS.ResourceID = 0; modelDS.LoginName = Page.User.Identity.Name.Trim(); modelDS.ResourceName = "税务登记证(地税)"; modelDS.ResourceTitle = "地税"; modelDS.ResourceDescrib = "税务登记证(地税)"; //资源介绍 modelDS.ResourceType = 1; //资源类型 modelDS.ResourceAddr = PicDS; modelDS.ResourceProperty = 3; //资源性质 modelDS.ResourcePassword = null; //资源密码 modelDS.UpDate = DateTime.Now; //上传日期 modelDS.IsDel = false; //是否删除 modelDS.remark = "税务登记证(地税)"; UpLoadImage(modelDS); } #endregion #region 其它荣誉和证书fuRYZS string[] RYZSName = fuRYZS.SaveImages("EnterpriseRegister"); string PicRYZS = ""; if (RYZSName.Length > 0) { modelRYZS = new Tz888.Model.MemberResourceModel(); PicRYZS = RYZSName[0]; modelRYZS.ResourceID = 0; modelRYZS.LoginName = Page.User.Identity.Name.Trim(); modelRYZS.ResourceName = "其它荣誉和证书"; modelRYZS.ResourceTitle = "其它荣誉和证书"; modelRYZS.ResourceDescrib = "其它荣誉和证书"; //资源介绍 modelRYZS.ResourceType = 1; //资源类型 modelRYZS.ResourceAddr = PicRYZS; modelRYZS.ResourceProperty = 4; //资源性质 modelRYZS.ResourcePassword = null; //资源密码 modelRYZS.UpDate = DateTime.Now; //上传日期 modelRYZS.IsDel = false; //是否删除 modelRYZS.remark = "其它荣誉和证书"; UpLoadImage(modelRYZS); } #endregion //组织机构代码 Tz888.BLL.Register.EnterpriseRegisterBLL objOrgCode = new Tz888.BLL.Register.EnterpriseRegisterBLL(); string strCode = objOrgCode.GetOrganizationCode(Page.User.Identity.Name); if (strCode != "") { string[] Code = strCode.Split('-'); TextBox1.Text = Code[0]; TextBox2.Text = Code[1]; } if (TextBox1.Text.Trim() != "" && TextBox2.Text.Trim() != "") { string Code = TextBox1.Text.Trim() + "-" + TextBox2.Text.Trim(); if (objOrgCode.UpdateOrganizationCode(Page.User.Identity.Name, Code) < 0) { Tz888.Common.MessageBox.Show(this.Page, "组织机构代码修改出错!"); return; } } //string reg=Request.QueryString["reg"].Trim(); //string web=Request.QueryString["web"].Trim(); //int type = 0; //if (Page.User.IsInRole("GT1001")) //普通会员 // type = 0; //else // type = 1; // Response.Redirect("OrgRegisterSucceed.aspx?type=" + type + "®="+reg+"&web=" + web); Tz888.Common.MessageBox.ShowAndRedirect(this.Page, "上传成功!", "EnterpriseRegister_additive.aspx"); imgLoad(); }