/// <summary> /// ����ָ�������̴��������� /// </summary> /// <param name="ct">Ҫ���ĵ����̴���������</param> /// <returns>����,���ڻ����0��ɹ�,�����ʧ��</returns> public int Update(InviteBusinessTypeInfo it) { if (object.Equals(null, it)) return -2; return DAL.Update(it); }
protected void btnok_Click(object sender, EventArgs e) { PT_ID = XYECOM.Core.MyConvert.GetInt64(XYECOM.Core.XYRequest.GetQueryString("pt_id")); ename = XYECOM.Core.XYRequest.GetQueryString("ename"); if (this.tbName.Text == "") { Alert("�������Ʋ���Ϊ�գ�"); return; } type = XYECOM.Core.XYRequest.GetQueryString("type"); //�ж�����ӱ��滹�DZ༭���� if (type.Equals("0") || XYECOM.Core.XYRequest.GetQueryString("pt_id").Equals("0")) { string TypeName = tbName.Text.Trim().Replace("��", ","); string[] arr = TypeName.Split(','); for (int i = 0; i < arr.Length; i++) { InsertData(arr[i].Trim()); if (error) continue; } if (!error) Response.Redirect("Typelist.aspx?ename=" + ename + "&orderid=" + PT_ID + "&add=1"); } if (type.Equals("1")) { int err = 0; if (ename.Equals("job") || ename.Equals("exhibition")) { if (ename.Equals("job")) { postinfo = post.GetItem((int)PT_ID); postinfo.P_Name = this.tbName.Text.Trim(); err = post.Update(postinfo); } if (ename.Equals("exhibition")) { showinfo = showtype.GetItem(PT_ID); showinfo.SHT_Name = this.tbName.Text.Trim(); err = showtype.Update(showinfo); } } else { if (ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment")) { iti = it.GetItem(PT_ID); iti.IT_Name = this.tbName.Text.Trim(); err = it.Update(iti); } if (ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service")) { sti = st.GetItem(PT_ID); sti.ST_Name = this.tbName.Text.Trim(); err = st.Update(sti); } } if (err > 0) { Response.Redirect("Typelist.aspx?ename=" + ename + "&orderid=" + PT_ID); } else { Alert("��ʧ�ܣ�", backUrl + "?orderid=" + pt_id + "&ename=" + XYECOM.Core.XYRequest.GetQueryString("ename")); } } }
/// <summary> /// ���һ���µ����̴��������� /// </summary> /// <param name="ct">Ҫ��ӵ����̴���������</param> /// <returns>����,���ڻ����0��ɹ�,�����ʧ��,-1��������ͬ���</returns> public int Insert(InviteBusinessTypeInfo it) { if (object.Equals(null, it)) return -2; return DAL.Insert(it); }
private void pageinit() { if (XYECOM.Core.XYRequest.GetQueryString("pt_id").Equals("0")) { lblName.Text = "�����"; this.module.Visible = true; this.module2.Visible = true; } //ģ������ ename = XYECOM.Core.XYRequest.GetQueryString("ename"); switch (ename) { case "venture": lblType.Text = "�ӹ���Ϣ"; break; case "investment": lblType.Text = "���̴���"; break; case "service": lblType.Text = "������Ϣ"; break; case "brand": lblType.Text = "Ʒ�Ʒ���"; break; case "job": lblType.Text = "��Ƹ��λ"; break; case "exhibition": lblType.Text = "չ�����"; break; case "pifa": lblType.Text = "������Ϣ"; break; } //type:0��� / type:1�༭ type = XYECOM.Core.XYRequest.GetQueryString("type"); if (ename.Equals("")) { ename = "venture"; } pt_id = XYECOM.Core.XYRequest.GetQueryString("pt_id"); int parentId = XYECOM.Core.MyConvert.GetInt32(pt_id); #region ����������� if (type.Equals("0")) { if (ename.Equals("job") || ename.Equals("exhibition")) { if (ename.Equals("job") && pt_id != "0") { postinfo = post.GetItem(parentId); lblName.Text = GetTypeAllName(ename, postinfo.P_ID); } if ((ename.Equals("exhibition") && pt_id != "0")) { showinfo = showtype.GetItem(parentId); lblName.Text = GetTypeAllName(ename, showinfo.SHT_ID); } } else { if ((ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment")) && pt_id != "0") { iti = it.GetItem(parentId); lblName.Text = GetTypeAllName(ename, iti.IT_ID); } if ((ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service")) && pt_id != "0") { sti = st.GetItem(parentId); lblName.Text = GetTypeAllName(ename, sti.ST_ID); } } } #endregion #region ���ر༭��� if (type.Equals("1")) { lbremark.Visible = false; tbName.TextMode = TextBoxMode.SingleLine; if (ename.Equals("job") || ename.Equals("exhibition")) { if (ename.Equals("job") && pt_id != "0") { postinfo = post.GetItem(Convert.ToInt32(pt_id)); PT_ID = postinfo.P_ID; this.tbName.Text = postinfo.P_Name; this.PT_ParentID = postinfo.P_ParentID; if (PT_ParentID != 0) { postinfo = post.GetItem(Convert.ToInt32(PT_ParentID)); lblName.Text = GetTypeAllName(ename, postinfo.P_ID); } else { this.lblName.Text = "һ�����"; } } if ((ename.Equals("exhibition") && pt_id != "0")) { showinfo = showtype.GetItem(Convert.ToInt64(pt_id)); PT_ID = showinfo.SHT_ID; this.tbName.Text = showinfo.SHT_Name; this.PT_ParentID = showinfo.SHT_ParentID; if (PT_ParentID != 0) { showinfo = showtype.GetItem(PT_ParentID); lblName.Text = GetTypeAllName(ename, showinfo.SHT_ID); } else { this.lblName.Text = "һ�����"; } } } else { if ((ename.Equals("investment") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("investment")) && pt_id != "0") { iti = it.GetItem(Convert.ToInt64(pt_id)); PT_ID = iti.IT_ID; this.tbName.Text = iti.IT_Name; this.PT_ParentID = iti.IT_ParentID; if (PT_ParentID != 0) { iti = it.GetItem(PT_ParentID); lblName.Text = GetTypeAllName(ename, iti.IT_ID); } else { this.lblName.Text = "һ�����"; } } if ((ename.Equals("service") || XYECOM.Configuration.Module.Instance.GetItem(ename).PEName.Equals("service")) && pt_id != "0") { sti = st.GetItem(Convert.ToInt64(pt_id)); PT_ID = sti.ST_ID; this.tbName.Text = sti.ST_Name; this.PT_ParentID = sti.ST_ParentID; if (PT_ParentID != 0) { sti = st.GetItem(PT_ParentID); lblName.Text = GetTypeAllName(ename, sti.ST_ID); } else { this.lblName.Text = "һ�����"; } } } } #endregion }