internal workshop[] AddWorkshop(workshop wshop) { DataSet dsWorkshop = objDL.dlFillDataSet("sp_AddWorkshop", "_WorkshopName", "varchar", wshop.WorkshopName, "_WorkshopStatus", "varchar", wshop.WorkshopStatus, "_WorkshopDate", "datetime", wshop.WorkshopDate, "_Venue", "varchar", wshop.Venue, "_AddressId", "int", wshop.AddressId, "_IsLive", "int", wshop.IsLive, "_CreatedDate", "datetime", wshop.CreatedDate, "_CreatedBy", "int", wshop.CreatedBy, "_ModifiedDate", "datetime", wshop.ModifiedDate, "_Modifiedby", "int", wshop.Modifiedby, "_SponsorPersonId", "int", wshop.SponsorPersonId, "_LastActivityDate", "datetime", wshop.LastActivityDate); workshop[] workshopList = new workshop[dsWorkshop.Tables[0].Rows.Count]; for (int i = 0; i < dsWorkshop.Tables[0].Rows.Count; i++) { workshopList[i] = new workshop { WorkshopId = Convert.ToInt32(dsWorkshop.Tables[0].Rows[i]["WorkshopId"].ToString()), WorkshopName = dsWorkshop.Tables[0].Rows[i]["WorkshopName"].ToString(), WorkshopStatus = dsWorkshop.Tables[0].Rows[i]["WorkshopStatus"].ToString(), WorkshopDate = Convert.ToDateTime(dsWorkshop.Tables[0].Rows[i]["WorkshopDate"].ToString()), Venue = dsWorkshop.Tables[0].Rows[i]["Venue"].ToString(), IsLive = Convert.ToInt32(dsWorkshop.Tables[0].Rows[i]["IsLive"].ToString()), CreatedDate = Convert.ToDateTime(dsWorkshop.Tables[0].Rows[i]["CreatedDate"].ToString()), LastActivityDate = Convert.ToDateTime(dsWorkshop.Tables[0].Rows[i]["LastActivityDate"].ToString()) }; } return(workshopList); }
/// <summary> /// 添加车间变动日志 /// </summary> /// <param name="strTrainmanGUID"></param> /// <param name="strWorkShopGUID"></param> /// <param name="DutyUserGUID"></param> /// <param name="DutyUserNumber"></param> /// <param name="DutyUserName"></param> public void addLog4UpdateWs(Tm tm, string strWorkShopGUID, string DutyUserGUID, string DutyUserNumber, string DutyUserName) { workshop ws = new workshop(); string strNewName = ""; if (strWorkShopGUID != "") { ws = getWorkshop(strWorkShopGUID); strNewName = ws.strWorkShopName; } string strContent = string.Format("司机:{0}【{1}】 改变了车间 :由【{2}】 更改为【{3}】", tm.strTrainmanName, tm.strTrainmanNumber, tm.strWorkShopName, strNewName); SaveChangeLog(strContent, tm.strTrainmanJiaoluGUID, tm.strTrainmanJiaoluName, 11, DutyUserGUID, DutyUserNumber, DutyUserName); }
// GET: User public ActionResult DisplayUserDetails() { List <workshop> lstwrkshop = new List <workshop>(); workshop users = new workshop(); users.UserName = "******"; users.Password = "******"; lstwrkshop.Add(users); users = new workshop(); users.UserName = "******"; users.Password = "******"; lstwrkshop.Add(users); return(View(lstwrkshop)); }
internal workshop[] getWorkshop() { DataSet dsWorkshop = objDL.dlFillDataSet("sp_getWorkshop"); workshop[] workshopList = new workshop[dsWorkshop.Tables[0].Rows.Count]; for (int i = 0; i < dsWorkshop.Tables[0].Rows.Count; i++) { workshopList[i] = new workshop { WorkshopId = Convert.ToInt32(dsWorkshop.Tables[0].Rows[i]["WorkshopId"].ToString()), WorkshopName = dsWorkshop.Tables[0].Rows[i]["WorkshopName"].ToString(), WorkshopStatus = dsWorkshop.Tables[0].Rows[i]["WorkshopStatus"].ToString(), WorkshopDate = Convert.ToDateTime(dsWorkshop.Tables[0].Rows[i]["WorkshopDate"].ToString()), Venue = dsWorkshop.Tables[0].Rows[i]["Venue"].ToString(), IsLive = Convert.ToInt32(dsWorkshop.Tables[0].Rows[i]["IsLive"].ToString()), CreatedDate = Convert.ToDateTime(dsWorkshop.Tables[0].Rows[i]["CreatedDate"].ToString()), LastActivityDate = Convert.ToDateTime(dsWorkshop.Tables[0].Rows[i]["LastActivityDate"].ToString()) }; } return(workshopList); }
public workshop[] AddWorkshop(workshop wshop) { return(objBL.AddWorkshop(wshop)); }