示例#1
0
        public int SaveJ40(BO.j40MailAccount rec)
        {
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.j40ID);
            if (rec.j02ID_Owner == 0)
            {
                rec.j02ID_Owner = _db.CurrentUser.j02ID;
            }
            p.AddInt("j02ID_Owner", rec.j02ID_Owner, true);
            p.AddInt("j40UsageFlag", (int)rec.j40UsageFlag);
            p.AddString("j40SmtpHost", rec.j40SmtpHost);
            p.AddInt("j40SmtpPort", rec.j40SmtpPort);
            p.AddString("j40SmtpName", rec.j40SmtpName);
            p.AddString("j40SmtpEmail", rec.j40SmtpEmail);
            p.AddString("j40SmtpLogin", rec.j40SmtpLogin);
            p.AddString("j40SmtpPassword", rec.j40SmtpPassword);
            p.AddBool("j40SmtpUseDefaultCredentials", rec.j40SmtpUseDefaultCredentials);
            p.AddBool("j40SmtpEnableSsl", rec.j40SmtpEnableSsl);
            p.AddBool("j40SmtpUsePersonalReply", rec.j40SmtpUsePersonalReply);
            p.AddString("j40ImapHost", rec.j40ImapHost);
            p.AddString("j40ImapLogin", rec.j40ImapLogin);
            p.AddString("j40ImapPassword", rec.j40ImapPassword);
            p.AddInt("j40ImapPort", rec.j40ImapPort);

            return(_db.SaveRecord("j40MailAccount", p.getDynamicDapperPars(), rec));
        }
示例#2
0
        public int Save(BO.j04UserRole rec)
        {
            if (!_mother.CurrentUser.IsGURU())
            {
                if (rec.j04IsClientRole && (TestOnePerm(BO.UserPermFlag.MasterAdmin, rec) || TestOnePerm(BO.UserPermFlag.MasterReader, rec)))
                {
                    _db.CurrentUser.AddMessage("U [CLIENT] role musíte lze zaškrtnout pouze client oprávnění.");
                    return(0);
                }
                if (rec.j04IsClientRole == false && (TestOnePerm(BO.UserPermFlag.ClientAdmin, rec) || TestOnePerm(BO.UserPermFlag.ClientReader, rec)))
                {
                    _db.CurrentUser.AddMessage("U [MASTER] role musíte lze zaškrtnout pouze master oprávnění.");
                    return(0);
                }
            }

            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.j04ID);
            p.AddString("j04Name", rec.j04Name);
            p.AddInt("j04PermissionValue", rec.j04PermissionValue);
            p.AddBool("j04IsClientRole", rec.j04IsClientRole);

            return(_db.SaveRecord("j04UserRole", p.getDynamicDapperPars(), rec));
        }
示例#3
0
        private int SaveX40(MailMessage m, BO.x40MailQueue rec)
        {
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.x40ID);
            p.AddString("x40MessageGuid", rec.x40MessageGuid);
            p.AddInt("j40ID", rec.j40ID, true);
            if (rec.j03ID == 0)
            {
                rec.j03ID = _mother.CurrentUser.pid;
            }
            p.AddInt("j03ID", rec.j03ID, true);
            p.AddInt("x40RecordPid", rec.x40RecordPid, true);
            p.AddString("x40Entity", rec.x40Entity);

            p.AddString("x40SenderAddress", m.From.Address);
            p.AddString("x40SenderName", m.From.DisplayName);
            p.AddString("x40To", String.Join(",", m.To.Select(p => p.Address)));
            p.AddString("x40Bcc", String.Join(",", m.Bcc.Select(p => p.Address)));
            p.AddString("x40Cc", String.Join(",", m.CC.Select(p => p.Address)));
            p.AddString("x40Subject", m.Subject);
            p.AddString("x40Body", m.Body);
            p.AddBool("x40IsHtmlBody", m.IsBodyHtml);
            p.AddDateTime("x40WhenProceeded", DateTime.Now);
            p.AddString("x40ErrorMessage", rec.x40ErrorMessage);
            p.AddInt("x40State", (int)rec.x40State);
            p.AddString("x40Attachments", String.Join(",", m.Attachments.Select(p => p.Name)));
            p.AddString("x40EmlFolder", rec.x40EmlFolder);
            p.AddInt("x40EmlFileSize", rec.x40EmlFileSize);
            return(_db.SaveRecord("x40MailQueue", p.getDynamicDapperPars(), rec));
        }
示例#4
0
        public int Save(BO.p51Order rec, List <BO.p52OrderItem> newitems)
        {
            if (ValidateBeforeSave(rec) == false)
            {
                return(0);
            }
            if (newitems != null)
            {
                if (newitems.Where(p => p.p11ID == 0).Count() > 0)
                {
                    _mother.CurrentUser.AddMessage("V položkách je nevyplněný produkt."); return(0);
                }
                if (newitems.Where(p => p.p52UnitsCount <= 0).Count() > 0)
                {
                    _mother.CurrentUser.AddMessage("V položkách je nekorektně zadané množství produktu."); return(0);
                }
            }

            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.p51ID);
            if (rec.j02ID_Owner == 0)
            {
                rec.j02ID_Owner = _db.CurrentUser.j02ID;
            }
            p.AddInt("j02ID_Owner", rec.j02ID_Owner, true);
            p.AddInt("p28ID", rec.p28ID, true);
            if (rec.pid == 0)
            {
                rec.b02ID = _mother.b02StatusBL.LoadStartStatusPID("p51", rec.b02ID);  //startovací workflow stav
            }
            p.AddInt("b02ID", rec.b02ID, true);
            p.AddBool("p51IsDraft", rec.p51IsDraft);
            p.AddString("p51Name", rec.p51Name);
            p.AddString("p51Code", rec.p51Code);
            p.AddString("p51Memo", rec.p51Memo);
            p.AddString("p51CodeByClient", rec.p51CodeByClient);

            p.AddDateTime("p51Date", rec.p51Date);
            p.AddDateTime("p51DateDelivery", rec.p51DateDelivery);
            p.AddDateTime("p51DateDeliveryConfirmed", rec.p51DateDeliveryConfirmed);

            int intP51ID = _db.SaveRecord("p51Order", p.getDynamicDapperPars(), rec);

            if (newitems != null)
            {
                foreach (var c in newitems)
                {
                    c.p51ID = intP51ID;
                    _mother.p52OrderItemBL.Save(c);

                    //_db.RunSql("INSERT INTO p52OrderItem(p51ID,p11ID,p52UnitsCount) VALUES(@p51id,@p11id,@unitscount)", new { p51id = intP51ID, p11id = c.p11ID, unitscount = c.p52UnitsCount });
                }
            }



            return(intP51ID);
        }
示例#5
0
        public int Save(BO.p85Tempbox rec)
        {
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.p85ID);
            p.AddString("p85GUID", rec.p85GUID);
            p.AddString("p85Prefix", rec.p85Prefix);
            p.AddInt("p85RecordPid", rec.p85RecordPid, true);
            p.AddInt("p85ClonePid", rec.p85ClonePid);
            p.AddBool("p85IsDeleted", rec.p85IsDeleted);

            p.AddInt("p85OtherKey1", rec.p85OtherKey1, true);
            p.AddInt("p85OtherKey2", rec.p85OtherKey2, true);
            p.AddInt("p85OtherKey3", rec.p85OtherKey3, true);
            p.AddInt("p85OtherKey4", rec.p85OtherKey4, true);
            p.AddInt("p85OtherKey5", rec.p85OtherKey5, true);

            p.AddString("p85FreeText01", rec.p85FreeText01);
            p.AddString("p85FreeText02", rec.p85FreeText02);
            p.AddString("p85FreeText03", rec.p85FreeText03);
            p.AddString("p85FreeText04", rec.p85FreeText04);
            p.AddString("p85FreeText05", rec.p85FreeText05);
            p.AddString("p85FreeText06", rec.p85FreeText06);

            p.AddBool("p85FreeBoolean01", rec.p85FreeBoolean01);
            p.AddBool("p85FreeBoolean02", rec.p85FreeBoolean02);
            p.AddBool("p85FreeBoolean03", rec.p85FreeBoolean03);
            p.AddBool("p85FreeBoolean04", rec.p85FreeBoolean04);

            p.AddDouble("p85FreeNumber01", rec.p85FreeNumber01);
            p.AddDouble("p85FreeNumber02", rec.p85FreeNumber02);
            p.AddDouble("p85FreeNumber03", rec.p85FreeNumber03);
            p.AddDouble("p85FreeNumber04", rec.p85FreeNumber04);
            p.AddDouble("p85FreeNumber05", rec.p85FreeNumber05);
            p.AddDouble("p85FreeNumber06", rec.p85FreeNumber06);

            p.AddDateTime("p85FreeDate01", rec.p85FreeDate01);
            p.AddDateTime("p85FreeDate02", rec.p85FreeDate02);
            p.AddDateTime("p85FreeDate03", rec.p85FreeDate03);
            p.AddDateTime("p85FreeDate04", rec.p85FreeDate04);

            return(_db.SaveRecord("p85Tempbox", p.getDynamicDapperPars(), rec));
        }
示例#6
0
        public int Save(BO.p18OperCode rec)
        {
            if (LoadByCode(rec.p18Code, rec.p25ID, rec.p18ID) != null)
            {
                _mother.CurrentUser.AddMessage("Kód operace nesmí být duplicitní v rámci jednoho typu zařízení.");
                return(0);
            }
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.p18ID);
            p.AddInt("p25ID", rec.p25ID, true);
            p.AddInt("p19ID", rec.p19ID, true);
            p.AddInt("p18Flag", rec.p18Flag);
            p.AddString("p18Name", rec.p18Name);
            p.AddString("p18Code", rec.p18Code);
            p.AddString("p18Memo", rec.p18Memo);
            p.AddDouble("p18UnitsCount", rec.p18UnitsCount);
            p.AddDouble("p18DurationPreOper", rec.p18DurationPreOper);
            p.AddDouble("p18DurOperUnits", rec.p18DurOperUnits);
            p.AddDouble("p18DurOperMinutes", rec.p18DurOperMinutes);
            if (rec.p18DurOperMinutes > 0 && rec.p18DurOperUnits > 0)
            {
                p.AddDouble("p18DurationOper", rec.p18DurOperMinutes / rec.p18DurOperUnits);
            }
            else
            {
                p.AddDouble("p18DurationOper", rec.p18DurationOper);
            }

            p.AddDouble("p18DurationPostOper", rec.p18DurationPostOper);
            p.AddDouble("p18OperParam", rec.p18OperParam);
            p.AddString("p18Lang1", rec.p18Lang1);
            p.AddString("p18Lang2", rec.p18Lang2);
            p.AddString("p18Lang3", rec.p18Lang3);
            p.AddString("p18Lang4", rec.p18Lang4);
            p.AddBool("p18IsRepeatable", rec.p18IsRepeatable);
            p.AddBool("p18IsManualAmount", rec.p18IsManualAmount);

            return(_db.SaveRecord("p18OperCode", p.getDynamicDapperPars(), rec));
        }
示例#7
0
        public int Save(BO.o51Tag rec)
        {
            if (rec.o51Name.Contains(","))
            {
                _mother.CurrentUser.AddMessage("Název položky kategorie nesmí obsahovat čárku.");
                return(0);
            }
            if (rec.o51Name.Length > 30)
            {
                _mother.CurrentUser.AddMessage("V názvu položky kategorie může být maximálně 30 znaků.");
                return(0);
            }

            if (GetList(new BO.myQuery("o51Tag")).Where(p => p.pid != rec.pid && p.o51Name.ToLower() == rec.o51Name.Trim().ToLower()).Count() > 0)
            {
                _mother.CurrentUser.AddMessage("Položka kategorie s tímto názvem již existuje.");
                return(0);
            }

            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.o51ID);
            if (rec.j02ID_Owner == 0)
            {
                rec.j02ID_Owner = _db.CurrentUser.j02ID;
            }
            p.AddInt("j02ID_Owner", rec.j02ID_Owner, true);
            p.AddInt("o53ID", rec.o53ID, true);
            p.AddString("o51Name", rec.o51Name);
            p.AddString("o51Code", rec.o51Code);
            p.AddInt("o51Ordinary", rec.o51Ordinary);

            p.AddBool("o51IsColor", rec.o51IsColor);
            if (rec.o51IsColor == false)
            {
                rec.o51ForeColor = "";
                rec.o51BackColor = "";
            }
            p.AddString("o51ForeColor", rec.o51ForeColor);
            p.AddString("o51BackColor", rec.o51BackColor);

            int intPID = _db.SaveRecord("o51Tag", p.getDynamicDapperPars(), rec);

            var pars = new Dapper.DynamicParameters();

            pars.Add("userid", _db.CurrentUser.pid);
            pars.Add("pid", intPID, System.Data.DbType.Int32);
            pars.Add("err_ret", "", System.Data.DbType.String, System.Data.ParameterDirection.Output);
            _db.RunSp("o51_after_save", ref pars);

            return(intPID);
        }
示例#8
0
        public int Save(BO.p41Task rec)
        {
            if (ValidateBeforeSave(rec) == false)
            {
                return(0);
            }
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.p41ID);
            if (rec.j02ID_Owner == 0)
            {
                rec.j02ID_Owner = _db.CurrentUser.j02ID;
            }
            p.AddInt("j02ID_Owner", rec.j02ID_Owner, true);
            p.AddInt("p27ID", rec.p27ID, true);
            p.AddInt("p52ID", rec.p52ID, true);
            if (rec.pid == 0)
            {
                rec.b02ID = _mother.b02StatusBL.LoadStartStatusPID("p41", rec.b02ID);  //startovací workflow stav
            }
            p.AddInt("b02ID", rec.b02ID, true);
            p.AddInt("p41MasterID", rec.p41MasterID, true);         //ID master zakázky
            p.AddInt("p41SuccessorID", rec.p41SuccessorID, true);   //ID následníka
            p.AddBool("p41IsDraft", rec.p41IsDraft);
            p.AddString("p41Name", rec.p41Name);
            p.AddString("p41Code", rec.p41Code);
            p.AddString("p41Memo", rec.p41Memo);
            p.AddString("p41StockCode", rec.p41StockCode);

            if (rec.p41PlanStart.Year > 1900)
            {
                p.AddDateTime("p41PlanStart", rec.p41PlanStart);
            }


            p.AddDouble("p41PlanUnitsCount", rec.p41PlanUnitsCount);

            int intPID = _db.SaveRecord("p41Task", p.getDynamicDapperPars(), rec);

            run_p41_after_save(intPID);

            return(intPID);
        }
示例#9
0
        public int Save(BO.j03User rec)
        {
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.j03ID);
            p.AddInt("j02ID", rec.j02ID, true);
            p.AddInt("j04ID", rec.j04ID, true);
            p.AddBool("j03IsMustChangePassword", rec.j03IsMustChangePassword);
            p.AddString("j03Login", rec.j03Login);
            p.AddInt("j03AccessFailedCount", rec.j03AccessFailedCount);
            p.AddInt("j03ModalDialogFlag", rec.j03ModalDialogFlag);
            p.AddInt("j03FontStyleFlag", rec.j03FontStyleFlag);
            p.AddInt("j03SideBarFlag", rec.j03SideBarFlag);
            p.AddInt("j03EnvironmentFlag", rec.j03EnvironmentFlag);
            p.AddInt("j03GridSelectionModeFlag", rec.j03GridSelectionModeFlag);
            p.AddDateTime("j03LiveChatTimestamp", rec.j03LiveChatTimestamp);
            if (!String.IsNullOrEmpty(rec.j03PasswordHash))
            {
                p.Add("j03PasswordHash", rec.j03PasswordHash);
            }


            return(_db.SaveRecord("j03User", p.getDynamicDapperPars(), rec));
        }
示例#10
0
        public int Save(BO.o53TagGroup rec)
        {
            if (String.IsNullOrEmpty(rec.o53Entities) == true)
            {
                _mother.CurrentUser.AddMessage("Chybí vazba na entity.");
                return(0);
            }
            var p = new DL.Params4Dapper();

            if (rec.o53Field == null)//najít volné pole pro grid
            {
                var lis           = GetList(new BO.myQuery("o53TagGroup")).Where(p => p.o53Field != null).OrderByDescending(p => p.o53Field);
                int intFieldIndex = 1;
                if (lis.Count() > 0)
                {
                    intFieldIndex = 1 + Convert.ToInt32(BO.BAS.RightString(lis.First().o53Field, 2));
                }
                rec.o53Field = "o54Group" + BO.BAS.RightString("0" + intFieldIndex.ToString(), 2);
            }

            p.AddInt("pid", rec.o53ID);
            p.AddString("o53Name", rec.o53Name);
            if (rec.j02ID_Owner == 0)
            {
                rec.j02ID_Owner = _db.CurrentUser.j02ID;
            }
            p.AddInt("j02ID_Owner", rec.j02ID_Owner, true);
            p.AddString("o53Entities", rec.o53Entities);
            p.AddInt("o53Ordinary", rec.o53Ordinary);
            p.AddBool("o53IsMultiSelect", rec.o53IsMultiSelect);
            p.AddString("o53Field", rec.o53Field);



            return(_db.SaveRecord("o53TagGroup", p.getDynamicDapperPars(), rec));
        }
示例#11
0
        public int Save(BO.x31Report rec)
        {
            if (ValidateBeforeSave(rec) == false)
            {
                return(0);
            }
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.x31ID);
            p.AddString("x31Entity", rec.x31Entity);
            p.AddString("x31FileName", rec.x31FileName);
            p.AddString("x31Name", rec.x31Name);
            p.AddString("x31Code", rec.x31Code);

            p.AddEnumInt("x31ReportFormat", rec.x31ReportFormat);
            p.AddString("x31Description", rec.x31Description);
            p.AddBool("x31Is4SingleRecord", rec.x31Is4SingleRecord);

            int intPID = _db.SaveRecord("x31Report", p.getDynamicDapperPars(), rec);



            return(intPID);
        }
示例#12
0
        public int CreateChild(BO.p41Task rec, BO.p41Task recMaster, List <BO.AppendPostPreP44Oper> lisDestP44, int p18flag)
        {
            if (p18flag == 2 && LoadSuccessor(recMaster.pid) != null)
            {
                _mother.CurrentUser.AddMessage("K této zakázce již byl založen předchůdce.");
                return(0);
            }
            if (p18flag == 3 && recMaster.p41SuccessorID > 0)
            {
                _mother.CurrentUser.AddMessage("Tato zakázka již má založeného následníka.");
                return(0);
            }
            if (lisDestP44.Count == 0)
            {
                _mother.CurrentUser.AddMessage("Musíte zaškrtnout minimálně jednu operaci.");
                return(0);
            }
            if (rec.p27ID == 0 || String.IsNullOrEmpty(rec.p41Name) == true)
            {
                _mother.CurrentUser.AddMessage("Středisko a název jsou povinné informace.");
                return(0);
            }
            var p = new DL.Params4Dapper();

            p.AddInt("j02ID_Owner", _db.CurrentUser.j02ID, true);
            p.AddInt("p27ID", rec.p27ID, true);
            p.AddInt("b02ID", rec.b02ID, true);
            p.AddInt("p41MasterID", recMaster.pid, true);         //ID master zakázky
            if (p18flag == 2)
            {
                p.AddInt("p41SuccessorID", recMaster.pid, true);   //ID následníka pro PRE zakázku
            }


            p.AddString("p41Name", rec.p41Name);
            p.AddBool("p41IsDraft", rec.p41IsDraft);
            if (p18flag == 2)
            {
                p.AddString("p41Code", recMaster.p41Code + ".PRE");
            }
            if (p18flag == 3)
            {
                p.AddString("p41Code", recMaster.p41Code + ".POST");
            }
            p.AddString("p41Memo", rec.p41Memo);
            p.AddString("p41StockCode", rec.p41StockCode);



            int intPID = _db.SaveRecord("p41Task", p.getDynamicDapperPars(), rec);

            if (p18flag == 3)   //pro POST zakázku je následník MASTER zakázka
            {
                _db.RunSql("UPDATE p41Task set p41SuccessorID=@pid WHERE p41ID=@masterpid", new { pid = intPID, masterpid = recMaster.pid });
            }

            rec = Load(intPID);
            AppendPos(rec, lisDestP44, p18flag, false); //bez volání SP p41_after_save

            if (p18flag == 2)                           //spočítat p41PlanStart
            {
                _db.RunSql("UPDATE p41Task set p41Duration=dbo.p44_calc_duration(@pid),p41PlanStart=DATEADD(MINUTE,-1*dbo.p44_calc_duration(@pid),@d0) WHERE p41ID=@pid", new { pid = intPID, masterpid = recMaster.pid, d0 = recMaster.p41PlanStart });
            }
            if (p18flag == 3)
            {
                _db.RunSql("UPDATE p41Task set p41Duration=dbo.p44_calc_duration(@pid),p41PlanStart=@d0 WHERE p41ID=@pid", new { pid = intPID, d0 = recMaster.p41PlanEnd });
            }

            run_p41_after_save(intPID);

            return(intPID);
        }
示例#13
0
        public int Save(BO.j72TheGridTemplate rec, List <BO.j73TheGridQuery> lisJ73, List <int> j04ids, List <int> j11ids)
        {
            if (ValidateBeforeSave(rec, lisJ73) == false)
            {
                return(0);
            }
            var p = new DL.Params4Dapper();

            p.AddInt("pid", rec.j72ID);
            p.AddString("j72Name", rec.j72Name);
            p.AddBool("j72IsSystem", rec.j72IsSystem);
            p.AddInt("j03ID", rec.j03ID, true);

            p.AddString("j72Entity", rec.j72Entity);
            p.AddString("j72MasterEntity", rec.j72MasterEntity);
            p.AddString("j72Columns", rec.j72Columns);
            p.AddInt("j72SplitterFlag", rec.j72SplitterFlag);
            p.AddBool("j72IsMainMenu", rec.j72IsMainMenu);

            p.AddBool("j72IsNoWrap", rec.j72IsNoWrap);
            p.AddInt("j72SelectableFlag", rec.j72SelectableFlag);
            p.AddBool("j72IsPublic", rec.j72IsPublic);


            if (lisJ73 != null)
            {
                p.AddBool("j72HashJ73Query", false);
            }

            int intJ72ID = _db.SaveRecord("j72TheGridTemplate", p.getDynamicDapperPars(), rec);

            if (j04ids != null && j11ids != null)
            {
                if (rec.pid > 0)
                {
                    _db.RunSql("if EXISTS(select j74ID FROM j74TheGridReceiver WHERE j72ID=@pid) DELETE FROM j74TheGridReceiver WHERE j72ID=@pid", new { pid = intJ72ID });
                }
                if (j04ids.Count > 0)
                {
                    _db.RunSql("INSERT INTO j74TheGridReceiver(j72ID,j04ID) SELECT @pid,j04ID FROM j04UserRole WHERE j04ID IN (" + string.Join(",", j04ids) + ")", new { pid = intJ72ID });
                }
                if (j11ids.Count > 0)
                {
                    _db.RunSql("INSERT INTO j74TheGridReceiver(j72ID,j04ID) SELECT @pid,j11ID FROM j11Team WHERE j11ID IN (" + string.Join(",", j11ids) + ")", new { pid = intJ72ID });
                }
            }
            if (lisJ73 != null)
            {
                if (rec.pid > 0)
                {
                    _db.RunSql("if EXISTS(select j73ID FROM j73TheGridQuery WHERE j72ID=@pid) DELETE FROM j73TheGridQuery WHERE j72ID=@pid", new { pid = intJ72ID });
                }
                foreach (var c in lisJ73)
                {
                    if (c.IsTempDeleted == true && c.j73ID > 0)
                    {
                        _db.RunSql("DELETE FROM j73TheGridQuery WHERE j73ID=@pid", new { pid = c.j73ID });
                    }
                    else
                    {
                        p = new DL.Params4Dapper();
                        p.AddInt("pid", c.j73ID, true);
                        p.AddInt("j72ID", intJ72ID, true);
                        p.AddString("j73Column", c.j73Column);
                        p.AddString("j73Operator", c.j73Operator);
                        p.AddInt("j73ComboValue", c.j73ComboValue);
                        p.AddInt("j73DatePeriodFlag", c.j73DatePeriodFlag);
                        if (c.j73DatePeriodFlag > 0)
                        {
                            c.j73Date1 = null; c.j73Date2 = null;
                        }
                        p.AddDateTime("j73Date1", c.j73Date1);
                        p.AddDateTime("j73Date2", c.j73Date2);
                        p.AddDouble("j73Num1", c.j73Num1);
                        p.AddDouble("j73Num2", c.j73Num2);
                        p.AddString("j73Value", c.j73Value);
                        p.AddString("j73ValueAlias", c.j73ValueAlias);
                        p.AddInt("j73Ordinal", c.j73Ordinal);
                        p.AddString("j73Op", c.j73Op);
                        p.AddString("j73BracketLeft", c.j73BracketLeft);
                        p.AddString("j73BracketRight", c.j73BracketRight);
                        _db.SaveRecord("j73TheGridQuery", p.getDynamicDapperPars(), c, false, true);
                    }
                }
                if (GetList_j73(intJ72ID, rec.j72Entity.Substring(0, 3)).Count() > 0)
                {
                    _db.RunSql("UPDATE j72TheGridTemplate set j72HashJ73Query=1 WHERE j72ID=@pid", new { pid = intJ72ID });
                }
            }

            return(intJ72ID);
        }