Exemplo n.º 1
0
 public static ComplaintEntity getBycId(int cId)
 {
     DataRow dr = DbHelper.ExecuteDataRow("[dbo].[p_Complaint_getById]", cId);
     ComplaintEntity clEnt = new ComplaintEntity();
     if (dr != null)
     {
         clEnt.ComplaintId = cId;
         if (dr["ComplaintDt"] != DBNull.Value)
             clEnt.ComplaintDt = Convert.ToDateTime(dr["ComplaintDt"]);
         if (dr["buyerid"] != DBNull.Value)
             clEnt.BuyerId = Convert.ToInt32(dr["buyerid"]);
         if (dr["productId"] != DBNull.Value)
             clEnt.ProductId = Convert.ToInt32(dr["productId"]);
         if (dr["ComplaintType"] != DBNull.Value)
             clEnt.ComplaintType = Convert.ToInt32(dr["ComplaintType"]);
         if (dr["DepartmentId"] != DBNull.Value)
             clEnt.DepartmentId = Convert.ToInt32(dr["DepartmentId"]);
         if (dr["DepartmentItemId"] != DBNull.Value)
             clEnt.DepartmentItemId = Convert.ToInt32(dr["DepartmentItemId"]);
         if (dr["ResponsibleId"] != DBNull.Value)
             clEnt.ResponsibleId = Convert.ToInt32(dr["responsibleid"]);
         if (dr["SellerId"] != DBNull.Value)
             clEnt.SellerId = Convert.ToInt32(dr["SellerId"]);
         if (dr["ComplaintLevel"] != DBNull.Value)
             clEnt.ComplaintLevel = Convert.ToInt32(dr["ComplaintLevel"]);
         clEnt.ComplaintResult = dr["ComplaintResult"].ToString();
         clEnt.Remarks = dr["Remarks"].ToString();
         if (dr["InputDt"] != DBNull.Value)
             clEnt.InputDt = Convert.ToDateTime(dr["InputDt"]);
         if (dr["adminid"] != DBNull.Value)
             clEnt.adminId = Convert.ToInt32(dr["adminid"]);
     }
     return clEnt;
 }
Exemplo n.º 2
0
 protected void btn_Save_Click(object sender, EventArgs e)
 {
     ComplaintEntity clEnt = new ComplaintEntity();
     clEnt.ComplaintDt = ext_ComplaintDt.SelectedDate;
     clEnt.BuyerId = Convert.ToInt32(ddl_buyer.SelectedValue);
     int productId = 0;
     int.TryParse(hid_proId.Value, out productId);
     clEnt.ProductId = productId;
     clEnt.ComplaintType = Convert.ToInt32(ddl_ComplainttypeSub.SelectedValue);
     clEnt.DepartmentId = Convert.ToInt32(hid_departmentId.Value);
     clEnt.DepartmentItemId = Convert.ToInt32(hid_DepartmentItemId.Value);
     int rsId = 0;
     //int.TryParse(ddl_responsibleid.SelectedValue, out rsId);
     if (clEnt.DepartmentItemId == checker)
     {
         //int.TryParse(hid_resId.Value, out rsId);
         int.TryParse(ViewState["resId"].ToString(),out rsId);
     }
     else
     {
         int.TryParse(ddl_responsibleid.SelectedValue, out rsId);
     }
     clEnt.ResponsibleId = rsId;
     int sellerId = 0;
     int.TryParse(ddl_sellerName.SelectedValue, out sellerId);
     clEnt.SellerId = sellerId;
     clEnt.ComplaintLevel = Convert.ToInt32(hid_severityLevel.Value);
     clEnt.ComplaintResult =ddl_result.SelectedValue;
     clEnt.Remarks = txt_remarks.Text;
     clEnt.adminId = logic.sysAdmin.AdminID;
     if (cId!=0)
     {
         clEnt.ComplaintId = cId;
         logic.complaint.update(clEnt);
     }
     else
     {
         logic.complaint.insert(clEnt);
     }
     Library.Script.ClientMsgUrl("投诉信息保存成功!", "complaintList.aspx");
 }
Exemplo n.º 3
0
 public static void update(ComplaintEntity clEnt)
 {
     Complaint.update(clEnt);
 }
Exemplo n.º 4
0
 public static int insert(ComplaintEntity clEnt)
 {
     return Complaint.insert(clEnt);
 }
Exemplo n.º 5
0
 public static void update(ComplaintEntity clEnt)
 {
     DbHelper.ExecuteNonQuery("[dbo].[p_Complaint_update]", clEnt.ComplaintId, clEnt.ComplaintDt, clEnt.BuyerId, clEnt.ProductId, clEnt.ComplaintType, clEnt.DepartmentId, clEnt.DepartmentItemId, clEnt.ResponsibleId, clEnt.SellerId, clEnt.ComplaintLevel, clEnt.ComplaintResult, clEnt.Remarks,clEnt.adminId);
 }
Exemplo n.º 6
0
 public static int insert(ComplaintEntity clEnt)
 {
     return Convert.ToInt32(DbHelper.ExecuteScalar("[dbo].[p_Complaint_insert]", clEnt.BuyerId,clEnt.ComplaintDt,clEnt.ProductId,clEnt.ComplaintType,
         clEnt.DepartmentId,clEnt.DepartmentItemId,clEnt.ResponsibleId,clEnt.SellerId,clEnt.ComplaintLevel,clEnt.ComplaintResult,clEnt.Remarks,clEnt.adminId));
 }