Пример #1
0
        public bool Action(string HID, string ReportCode, string ReportName, string Condition1, string Condition2,
                           string Condition3, string Condition4, string ImportFolder, string BackUpFolder, string LogFolder,
                           string OutputFolder, bool rowState, string UserLogin, PAction action)
        {
            dt                 = SourceFile_MappingHeaderDto.Data();
            dr                 = dt.NewRow();
            dr["HID"]          = HID;
            dr["ReportCode"]   = ReportCode;
            dr["ReportName"]   = ReportName;
            dr["Condition1"]   = Condition1;
            dr["Condition2"]   = Condition2;
            dr["Condition3"]   = Condition3;
            dr["Condition4"]   = Condition4;
            dr["ImportFolder"] = ImportFolder;
            dr["BackUpFolder"] = BackUpFolder;
            dr["LogFolder"]    = LogFolder;
            dr["OutputFolder"] = OutputFolder;
            dr["ROW_STATE"]    = rowState ? "1" : "0";
            dr["CREATE_BY"]    = UserLogin;
            dr["UPDATE_BY"]    = UserLogin;
            dt.Rows.Add(dr);
            switch (action)
            {
            case PAction.Add: isCan = Add(); break;

            case PAction.Update: isCan = Update(); break;

            case PAction.Delete: isCan = Delete(); break;
            }
            return(isCan);
        }
Пример #2
0
 public override DataTable FindByColumn(object dto)
 {
     dt         = SourceFile_MappingHeaderDto.Data();
     dr         = dt.NewRow();
     dr["Name"] = "";
     return(dao.FindByColumn(dt));
 }
Пример #3
0
 public DataSet FindHeaderAndDetailPK(object dto)
 {
     dt        = SourceFile_MappingHeaderDto.Data();
     dr        = dt.NewRow();
     dr["HID"] = "1";
     dt.Rows.Add(dr);
     return(dao.FindHeaderAndDetailPK(dt));
 }
Пример #4
0
 /// <summary>
 /// active =1 /0 if active is empty then show all
 /// </summary>
 /// <param name="name"></param>
 /// <param name="active"></param>
 /// <returns></returns>
 public DataTable FindByColumn(string name, string active)
 {
     dt = SourceFile_MappingHeaderDto.Data();
     dr = dt.NewRow();
     dr["ReportName"] = name;
     dr["ROW_STATE"]  = active;
     dt.Rows.Add(dr);
     return(dao.FindByColumn(dt));
 }
Пример #5
0
 public DataSet FindHeaderAndDetailPK(string HID, string userName)
 {
     dt              = SourceFile_MappingHeaderDto.Data();
     dr              = dt.NewRow();
     dr["HID"]       = HID;
     dr["UPDATE_BY"] = userName;
     dt.Rows.Add(dr);
     return(dao.FindHeaderAndDetailPK(dt));
 }
Пример #6
0
        public override DataTable FindByAll()
        {
            isCan = false;
            DataTable dtObj = null;

            try
            {
                DataTable dt = SourceFile_MappingHeaderDto.Data();
                DataRow   dr = dt.NewRow();
                dr["ROW_STATE"] = "1";
                dt.Rows.Add(dr);

                OpenConection();
                dtObj = ExcecuteToDataTable("sp_SourceFile_MappingHeader_FindAll", dt);
            }
            catch (Exception ex)
            { throw ex; }
            finally
            { CloseConnection(); }
            return(dtObj);
        }