예제 #1
0
    private string getTable()
    {
        string  res = "";
        DataSet ds  = LeaveStockInfoManage.GetTemplateInfo();

        if (ds != null)
        {
            res = JsonHelper.DataTableToJsonForEasyUiDataGridLoadDataMethod(ds.Tables[0].Rows.Count, ds.Tables[0]);
        }
        return(res);
    }
예제 #2
0
    private string add()
    {
        string  res = "";
        DataSet ds  = LeaveStockInfoManage.GetTemplateInfo();

        if (ds != null)
        {
            ArrayList list = new ArrayList();
            foreach (DataRow row in ds.Tables[0].Rows)
            {
                Dictionary <string, string> dict = new Dictionary <string, string>();
                string val = Request.Form[row["field"].ToString()];
                dict.Add("field", row["field"].ToString());
                dict.Add("alias", val);
                dict.Add("type", Request.Form["type"]);
                list.Add(dict);
            }
            res = LeaveStockInfoManage.InsertTemplate(list);
        }
        return(res);
    }