public static ChannelMessageView fromChannelMessageLite(ChannelMessageLite message) { return(message == null ? new ChannelMessageView() : new ChannelMessageView { id = message.id, nonce = getNonce(message.nonce), channelId = message.channelId, author = new User { id = message.author.id }, content = getContent(message.content, message.deletedTime.isNotEmpty(), message.attachments), fileSize = getFileSize(message.content, message.deletedTime.isNotEmpty(), message.attachments), width = getImageWidth(message.content, message.deletedTime.isNotEmpty(), message.attachments), height = getImageHeight(message.content, message.deletedTime.isNotEmpty(), message.attachments), time = DateConvert.DateTimeFromNonce(message.id), attachments = message.attachments, type = getType(message.content, message.deletedTime.isNotEmpty(), message.attachments), mentionEveryone = message.mentionEveryone, mentions = message.mentions?.Select(user => new User { id = user.id }).ToList(), deleted = message.deletedTime != null }); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ClAgreement cl = new ClAgreement(); cl.AgreementID = Convert.ToInt32(Request.QueryString["aid"].ToString()); DataSet ds = AgreementClass.GetList(cl); DataRow dr = ds.Tables[0].Rows[0]; lblactive.Text = dr["StatusName"].ToString(); lblFulname.Text = dr["AgreementID"].ToString() + " " + dr["FullName"].ToString(); lblPeymanIDName.Text = dr["PeymanName"].ToString(); lblStatrtDateAgreement.Text = DateConvert.m2sh(dr["StatrtDateAgreement"].ToString()).ToString(); lblsupervisorStaticIDName.Text = dr["SuperVisorName"].ToString(); //LBlPayePrice.Text = dr[""].ToString(); //LBlMablagh.Text = dr[""].ToString(); LBLPeymankarName.Text = dr["PeymanKarIDName"].ToString(); if (dr["StatusID"].ToString() == "1") { lblactive.ForeColor = System.Drawing.Color.Green; } else { lblactive.ForeColor = System.Drawing.Color.Red; } } }
public static ChannelMessageView fromChannelMessageLite(ChannelMessageLite message) { return(message == null ? new ChannelMessageView() : new ChannelMessageView { id = message.id, nonce = getNonce(message.nonce), channelId = message.channelId, author = new User { id = message.author.id }, content = getContent(message.content, message.deletedTime.isNotEmpty(), message.attachments), fileSize = getFileSize(message.content, message.deletedTime.isNotEmpty(), message.attachments), width = getImageWidth(message.content, message.deletedTime.isNotEmpty(), message.attachments), height = getImageHeight(message.content, message.deletedTime.isNotEmpty(), message.attachments), time = DateConvert.DateTimeFromNonce(message.id), attachments = message.attachments, type = getType(message.content, message.deletedTime.isNotEmpty(), message.attachments), mentionEveryone = message.mentionEveryone, mentions = message.mentions?.Select(user => new User { id = user.id }).ToList(), deleted = message.deletedTime != null, reactions = new List <Reaction>(), reactionsCountDict = new SortedDictionary <string, int>(), allUserReactionsDict = new Dictionary <string, Dictionary <string, int> >(), isGif = getImageIsGif(message.attachments) }); }
public override Widget build(BuildContext context) { var eventObj = new IEvent(); if (this.widget.viewModel.eventsDict.ContainsKey(this.widget.viewModel.eventId)) { eventObj = this.widget.viewModel.eventsDict[this.widget.viewModel.eventId]; } if ((this.widget.viewModel.eventDetailLoading || eventObj?.user == null) && !eventObj.isNotFirst) { return(new EventDetailLoading(mainRouterPop: this.widget.actionModel.mainRouterPop)); } var eventStatus = DateConvert.GetEventStatus(eventObj.begin); return(new Container( color: CColors.White, child: new CustomSafeArea( child: new Container( color: CColors.White, child: new NotificationListener <ScrollNotification>( onNotification: this._onNotification, child: new Column( children: new List <Widget> { this._buildEventDetail(context, eventObj), this._buildOfflineRegisterNow(eventObj, this.widget.viewModel.isLoggedIn, eventStatus) } ) ) ) ) )); }
public override Widget build(BuildContext context) { return(new Container( child: new Row( children: new List <Widget> { new Flexible( child: new Container( child: new Text( $"{this.fullName}", style: CTextStyle.PSmallBody3, maxLines: 1, overflow: TextOverflow.ellipsis ) ) ), new Container( child: new Text( $" · {DateConvert.DateStringFromNow(dt: this.time)}", style: CTextStyle.PSmallBody3 ) ), new Container( child: new Text( $" · 阅读 {this.viewCount}", style: CTextStyle.PSmallBody3 ) ) } ) )); }
public string AgreeProtest_Save(string AgreePercentProtestID, string AgreementPercentID, string ProtestComment, string ProtestDate, string UserResponseID ) { try { ClAgreePercentProtest cl = new ClAgreePercentProtest(); cl.AgreementPercentID = Convert.ToInt32(AgreementPercentID); cl.AgreePercentProtestID = Convert.ToInt32(AgreePercentProtestID); cl.ProtestComment = ProtestComment; cl.ProtestDate = DateConvert.sh2m(ProtestDate).ToString(); cl.UserResponseID = Convert.ToInt32(UserResponseID); int y = 0; if (AgreePercentProtestID == null || AgreePercentProtestID == "" || AgreePercentProtestID == "0") { y = AgreePercentProtestClass.insert(cl); } else { y = AgreePercentProtestClass.Update(cl); } return(y.ToString()); } catch { return("0"); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ClPersonal cl = new ClPersonal(); cl.PersonalID = Convert.ToInt32(Session["PersonalID"].ToString()); DataSet ds = PersonalClass.GetList(cl); DataRow dr = ds.Tables[0].Rows[0]; if (dr["Manage"].ToString() != "1") { Response.Redirect("PersonalView.aspx?msg=شما دسترسی به این صفحه ندارید"); return; } txtFromDate.Text = DateConvert.m2sh(DateTime.Now.AddDays(-10).ToString()); txtToDate.Text = DateConvert.m2sh(DateTime.Now.ToString()); BindddNazar(); if (Request.QueryString["sid"] != null) { ddRequestStatus.SelectedValue = Request.QueryString["sid"].ToString(); } //if (Request.QueryString["pid"] != null) // SetNameAndFamil(Convert.ToInt32(Request.QueryString["pid"])); //if (Request.QueryString["companyID"] != null) // ddcompany.SelectedValue = Request.QueryString["companyID"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ClPersonal cl = new ClPersonal(); cl.PersonalID = Convert.ToInt32(Session["PersonalID"].ToString()); DataSet ds = PersonalClass.GetList(cl); DataRow dr = ds.Tables[0].Rows[0]; if (dr["Manage"].ToString() != "1") { Response.Redirect("PersonalView.aspx?msg=شما دسترسی به این صفحه ندارید"); return; } txtFromDate.Text = DateConvert.m2sh(DateTime.Now.AddDays(-10).ToString()); txtToDate.Text = DateConvert.m2sh(DateTime.Now.ToString()); BindddNazar(); BindGrid(); if (GridView1.Items.Count == 0) { TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "درخواستی وجود ندارد"); } var dwizard = (HtmlGenericControl)Master.FindControl("dwiz"); dwizard.Visible = false; } }
public ActionResult Customers() { PDBC db = new PDBC(); var res = new List <CustomerModel>(); db.Connect(); DataTable dt = db.Select("SELECT [id_Customer],[C_Mobile],[C_regDate],[C_FirstName] +' '+[C_LastNAme] as C_Name,[C_Description],[C_ISActivate] FROM [tbl_Customer_Main]"); db.DC(); for (int i = 0; i < dt.Rows.Count; i++) { var model = new CustomerModel() { Num = i + 1, Id = Convert.ToInt32(dt.Rows[i]["id_Customer"]), Name = dt.Rows[i]["C_Name"].ToString(), Discription = dt.Rows[i]["C_Description"].ToString(), Phone = dt.Rows[i]["C_Mobile"].ToString(), IsActive = Convert.ToInt32(dt.Rows[i]["C_ISActivate"]), Reg_Date = DateConvert.DateReturner(dt.Rows[i]["C_regDate"].ToString(), "ShortDate") }; res.Add(model); } return(View(res)); }
public List <CustomerSidePostModel> Posttable() { var res = new List <CustomerSidePostModel>(); PDBC db = new PDBC(); db.Connect(); DataTable dt = db.Select("SELECT [Id],[Title],[GroupId],[Text_min],[Text],(SELECT [ad_firstname]+ ' '+ [ad_lastname] as name FROM [tbl_ADMIN_main]where id_Admin=[WrittenBy_AdminId])as adminName ,[Date],[IsImportant],[Is_Deleted],[Is_Disabled],(SELECT [name]FROM [tbl_BLOG_Categories] where Id=[Cat_Id]) as Category,(SELECT [name]FROM [tbl_BLOG_Groups] where G_Id=[GroupId]) as GroupName,(SELECT top 1 B.PicAddress FROM [tbl_BLOG_Pic_Connector] as A inner join [tbl_ADMIN_UploadStructure_ImageAddress] as B on A.[PicId]=B.PicID where A.PostId=Id)as Pic FROM [tbl_BLOG_Post] order by(date)desc"); db.DC(); for (int i = 0; i < dt.Rows.Count; i++) { var model = new CustomerSidePostModel() { Id = Convert.ToInt32(dt.Rows[i]["Id"]), by = dt.Rows[i]["adminName"].ToString(), Category = dt.Rows[i]["Category"].ToString(), InGroup = dt.Rows[i]["GroupName"].ToString(), ImagePath = dt.Rows[i]["Pic"].ToString(), IsDeleted = Convert.ToInt32(dt.Rows[i]["Is_Deleted"]), IsDisabled = Convert.ToInt32(dt.Rows[i]["Is_Disabled"]), text = dt.Rows[i]["Text"].ToString(), title = dt.Rows[i]["Title"].ToString(), text_min = dt.Rows[i]["Text_min"].ToString(), date = DateConvert.DateReturner(dt.Rows[i]["Date"].ToString(), "Date"), GPIDforPostPAge = dt.Rows[i]["GroupId"].ToString() }; res.Add(model); } return(res); }
public MappingProfile() { CreateMap <StmtrsDto, DataBankDto>() .ForMember(x => x.Id, opt => opt.MapFrom(_ => Guid.NewGuid())) .ForMember(x => x.Account, opt => opt.MapFrom(_ => _.BankAcctFrom.AcctId)) .ForMember(x => x.CodeBank, opt => opt.MapFrom(_ => _.BankAcctFrom.BankId)) .ForMember(x => x.Transactions, opt => opt.MapFrom(_ => _.BankTranList.Stmttrn.Select( sel => new TransactionDto { Id = Guid.NewGuid(), Description = string.Join(" ", sel.Memo.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)), TypeTransaction = sel.TrnType, Amount = sel.Trnamt, DateTrasaction = DateConvert.ToDate(sel.DtPosted) } ))); CreateMap <StmttrnDto, TransactionDto>() .ForMember(x => x.Id, opt => opt.MapFrom(_ => Guid.NewGuid())) .ForMember(x => x.TypeTransaction, opt => opt.MapFrom(_ => _.TrnType)) .ForMember(x => x.DateTrasaction, opt => opt.MapFrom(_ => DateConvert.ToDate(_.DtPosted))) .ForMember(x => x.Amount, opt => opt.MapFrom(_ => _.Trnamt)) .ForMember(x => x.Description, opt => opt.MapFrom(_ => string.Join(" ", _.Memo.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries)))); CreateMap <DataBank, DataBankDto>(); CreateMap <Transaction, TransactionDto>(); }
private string getallday(string allmonth) { string finalstr = ""; if (allmonth != "0" && allmonth != "") { if (allmonth.Remove(allmonth.Length - 1).Length > 0) { string iii = allmonth.Remove(allmonth.Length - 1).Replace("undefined", ""); string[] oo = iii.Split(','); for (int t = 0; t < oo.Length; t++) { finalstr += DateConvert.sh2m(oo[t].ToString()).ToString() + ","; } return(finalstr.Remove(finalstr.Length - 1)); } else { return(""); } } else { return(""); } }
static Widget _buildVideoTimeCard(float recordDuration) { return(new Container( padding: EdgeInsets.symmetric(horizontal: 8, vertical: 2), decoration: new BoxDecoration( CColors.Black, borderRadius: BorderRadius.circular(4) ), child: new Row( children: new List <Widget> { new Container( margin: EdgeInsets.only(right: 6.7f), child: new Icon( Icons.replay, color: CColors.White, size: 12 ) ), new Text( DateConvert.formatTime(recordDuration), style: CTextStyle.CaptionWhite ) } ) )); }
public static ChannelMessageView fromChannelMessage(ChannelMessage message) { return(message == null ? new ChannelMessageView() : new ChannelMessageView { id = message.id, nonce = getNonce(message.nonce), channelId = message.channelId, author = message.author, content = getContent(message.content, message.deletedTime.isNotEmpty(), message.attachments, message.embeds), fileSize = getFileSize(message.content, message.deletedTime.isNotEmpty(), message.attachments, message.embeds), width = getImageWidth(message.content, message.deletedTime.isNotEmpty(), message.attachments, message.embeds), height = getImageHeight(message.content, message.deletedTime.isNotEmpty(), message.attachments, message.embeds), time = DateConvert.DateTimeFromNonce(message.id), attachments = message.attachments, type = getType(message.content, message.deletedTime.isNotEmpty(), message.attachments, message.embeds), mentionEveryone = message.mentionEveryone, mentions = message.mentions, starred = message.starred, replyMessageIds = message.replyMessageIds, lowerMessageIds = message.lowerMessageIds, replyUsers = message.replyUsers, lowerUsers = message.lowerUsers, pending = message.pending, deleted = message.deletedTime != null, embeds = message.embeds, reactions = message.reactions }); }
private bool CheckDate() { bool result = true; int diffYear = 0; try { if (rdSahmsi.Checked) { diffYear = DateTime.Now.Year - Convert.ToInt32(DateConvert.sh2m(DDCarModel.Text + "/01/01").Year); } else { diffYear = DateTime.Now.Year - Convert.ToInt32(Convert.ToDateTime(DDCarModel.Text + "/01/01").Year); } } catch { result = false; } if (diffYear < 0 || diffYear > 30) { result = false; } return(result); }
public string AgreePercent_Save(string AgreementPercentID, string AgreementID, string ExplainID, string utilityPersent, string SuperVisorID, string VisitDate, string FineFactor, string JarimeComment, string FineMeterOrRepeat) { try { ClAgreementPercent cl = new ClAgreementPercent(); cl.AgreementID = Convert.ToInt32(AgreementID); cl.AgreementPercentID = Convert.ToInt32(AgreementPercentID); cl.ExplainID = Convert.ToInt32(ExplainID); cl.FineFactor = FineFactor; cl.FineMeterOrRepeat = Convert.ToInt32(FineMeterOrRepeat); cl.JarimeComment = JarimeComment; cl.SuperVisorID = Convert.ToInt32(SuperVisorID); cl.utilityPersent = Convert.ToInt32(utilityPersent); cl.VisitDate = DateConvert.sh2m(VisitDate).ToString(); int t = 0; if (AgreementPercentID == null || AgreementPercentID == "0" || AgreementPercentID == "") { t = AgreementPercentClass.insert(cl); } else { t = AgreementPercentClass.Update(cl); } return(t.ToString()); } catch { return("0"); } }
public void BindGrid() { ClAgreement cl = new ClAgreement(); cl.FromDateReport = DateConvert.sh2m(CtlFromDate.Text).ToString(); cl.ToDateReport = DateConvert.sh2m(CtlToDate.Text).ToString(); cl.AgreementID = Convert.ToInt32(lblAgrement.Text); cl.SubjectID = Convert.ToInt32(ddSubject.SelectedValue); DataSet ds = AgreementClass.GetListReport2(cl); DataView dv = new DataView(ds.Tables[0]); if (ViewState["AgreementID"] == null) { ViewState["AgreementID"] = "AgreementID Desc"; } dv.Sort = Securenamespace.SecureData.CheckSecurity(ViewState["AgreementID"].ToString()).ToString(); GridView1.DataSource = dv; GridView1.DataBind(); if (ds.Tables[0].Rows.Count > 0) { DataRow dr = ds.Tables[0].Rows[0]; LBLkHESARAT.Text = dr["finekhesarat"].ToString(); } }
private int InsertArchiv(int iii) { ClArchiveAgree cl = new ClArchiveAgree(); cl.AgreeID = Convert.ToInt32(lblAgrement.Text); cl.FromDate = DateConvert.sh2m(CtlFromDate.Text).ToString(); cl.ToDate = DateConvert.sh2m(CtlToDate.Text).ToString(); cl.ArchiveTitleID = iii; int i = ArchiveAgreeClass.insert(cl); if (i == -100) { CSharp.Utility.ShowMsg(Page, CSharp.ProPertyData.MsgType.warning, "خطا.در این بازه زمانی آرشیو صورت گرفته است"); } else if (i == 0) { CSharp.Utility.ShowMsg(Page, CSharp.ProPertyData.MsgType.warning, "داده ای برای آرشیو وجود ندارد.خطا در ثبت آرشیو"); } //ClExplanPrice cl = new ClExplanPrice(); //cl.AgreementID = AgreeID; // DataSet ds = ExplanPriceClass.GetList(cl); //DataRow dr; //int result = 0; //for(int i=0;i<ds.Tables[0].Rows.Count-1;i++){ // dr=ds.Tables[0].Rows[i]; // InsertOneSubject(Convert.ToInt32(dr["SubjectID"].ToString())); // result += 1; //} return(i); }
protected void Page_Load(object sender, EventArgs e) { try { if (!Page.IsPostBack) { if (Session["semat"].ToString() == "1") { CtlAgreePercent22.visibleBtn = false; CtlAgreePercent22.SematID = "1"; CtlAgreePercent22.EnableGrid = false; CtlAgreePercent22.visibleDeleteGrid = false; } CtlAgreePercent22.datedefault = DateConvert.m2sh(DateTime.Now.ToString()).ToString(); CtlAgreePercent22.Agreeid = Session["AgreeID"].ToString(); CtlAgreePercent22.SuperVisorID = Convert.ToInt32(Session["UserID"].ToString()); CtlAgreePercent22.BindSubject(); CtlAgreePercent22.BindGrid(); CtlAgreePercent22.visibleDeleteGrid = false; } } catch { } }
public override Widget build(BuildContext context) { if (this.article == null) { return(new Container()); } var username = this.user == null ? this.team.name : this.user.fullName; var time = this.article.lastPublishedTime == null ? this.article.publishedTime : this.article.lastPublishedTime; var child = new Container( color: CColors.White, padding: EdgeInsets.all(16), child: new Row( children: new List <Widget> { new Expanded( child: new Container( child: new Column( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.start, children: new List <Widget> { new Text(this.article.title, style: CTextStyle.PLargeTitle, maxLines: 2, overflow: TextOverflow.ellipsis, textAlign: TextAlign.left ), new Text( $"{username} · {DateConvert.DateStringFromNow(time)} · 阅读 {this.article.viewCount}", style: CTextStyle.PSmallBody3, textAlign: TextAlign.left ) } ) ) ), new Container( margin: EdgeInsets.only(8), width: 114, height: 76, child: new PlaceholderImage(this.article.thumbnail.url.EndsWith(".gif") ? this.article.thumbnail.url : $"{this.article.thumbnail.url}.450x0x1.jpg", 114, 76, 4, BoxFit.cover ) ) } ) ); return(new GestureDetector( onTap: this.onTap, child: child )); }
public ActionResult customerProfileComments() { int CustomerId = 1009; string Query; Query = "SELECT [C_FirstName]+' '+[C_LastNAme] as name,[id_Customer],[CommentId],[Message],[date],[Title],[C_regDate],[id_MProduct],[VerifyType] FROM [v_CommentsList] WHERE id_Customer=@CustomerId ORDER BY([date])DESC"; var Comments = new List <CommentModel>(); PDBC db = new PDBC(); ExcParameters par = new ExcParameters() { _KEY = "@CustomerId", _VALUE = CustomerId }; List <ExcParameters> pars = new List <ExcParameters>(); pars.Add(par); db.Connect(); using (DataTable dt = db.Select(Query, pars)) { for (int i = 0; i < dt.Rows.Count; i++) { CommentModel Comment = new CommentModel() { ProId = Convert.ToInt32(dt.Rows[i]["id_MProduct"]), CusromerId = Convert.ToInt32(dt.Rows[i]["id_Customer"]), ProTitle = dt.Rows[i]["Title"].ToString(), CustomerName = dt.Rows[i]["name"].ToString(), ProductCode = "", C_RegisterDate = DateConvert.DateReturner(dt.Rows[i]["C_regDate"].ToString(), "ShortDate"), CommentDate = DateConvert.DateReturner(dt.Rows[i]["date"].ToString(), "ShortDate"), Message = dt.Rows[i]["Message"].ToString(), CommentId = Convert.ToInt32(dt.Rows[i]["CommentId"]), VerifyType = dt.Rows[i]["VerifyType"].ToString(), }; Comment.Reply = new List <ReplyModel>(); using (DataTable dtJ = db.Select("SELECT [AdminId],[ad_avatarprofile],[ad_firstname]+' '+[ad_lastname] as AdName,[CommentId],[Message],[RepId],[date] FROM [v_ReplyList] WHERE [CommentId]=" + Comment.CommentId + " order by([date])DESC")) { for (int j = 0; j < dtJ.Rows.Count; j++) { Comment.Reply.Add(new ReplyModel() { //= dtJ.Rows[j][""].ToString(), AdminId = Convert.ToInt32(dtJ.Rows[j]["AdminId"]), Message = dtJ.Rows[j]["Message"].ToString(), RepDate = DateConvert.DateReturner(dtJ.Rows[j]["date"].ToString(), "DateTime"), AdminName = dtJ.Rows[j]["AdName"].ToString(), AdminPic = dtJ.Rows[j]["ad_avatarprofile"].ToString(), RepId = Convert.ToInt32(dtJ.Rows[j]["RepId"]), }); } } } db.DC(); return(View(Comments)); } }
Widget _buildNotificationTime() { var createdTime = this.notification.createdTime; return(new Container( child: new Text( DateConvert.DateStringFromNow(dt: createdTime), style: CTextStyle.PSmallBody4 ) )); }
private int InsertOneSubject(int Subject) { ClArchiveAgree cl = new ClArchiveAgree(); cl.SubjectID = Subject; cl.AgreeID = Convert.ToInt32(lblAgrement.Text); cl.FromDate = DateConvert.sh2m(CtlFromDate.Text).ToString(); cl.ToDate = DateConvert.sh2m(CtlToDate.Text).ToString(); int i = ArchiveAgreeClass.insert(cl); return(i); }
public override Widget build(BuildContext context) { var eventObj = new IEvent(); if (this.widget.viewModel.eventsDict.ContainsKey(this.widget.viewModel.eventId)) { eventObj = this.widget.viewModel.eventsDict[this.widget.viewModel.eventId]; } if (this._topPadding != MediaQuery.of(context).padding.top&& Application.platform != RuntimePlatform.Android) { this._topPadding = MediaQuery.of(context).padding.top; } if (this._bottomPadding != MediaQuery.of(context).padding.bottom&& Application.platform != RuntimePlatform.Android) { this._bottomPadding = MediaQuery.of(context).padding.bottom; this.setState(() => {}); } if ((this.widget.viewModel.eventDetailLoading || eventObj?.user == null) && !(eventObj?.isNotFirst ?? false)) { return(new EventDetailLoading(eventType: EventType.offline, mainRouterPop: this.widget.actionModel.mainRouterPop)); } var eventStatus = DateConvert.GetEventStatus(eventObj.begin); return(new Container( color: CColors.White, child: new CustomSafeArea( top: false, bottom: false, child: new Container( color: CColors.White, child: new NotificationListener <ScrollNotification>( onNotification: notification => this._onNotification(context, notification), child: new Column( children: new List <Widget> { this._buildEventDetail(eventObj), this._buildOfflineRegisterNow(eventObj, this.widget.viewModel.isLoggedIn, eventStatus) } ) ) ) ) )); }
public override Widget build(BuildContext context) { this._setAnimationPosition(context); var eventObj = new IEvent(); if (this.widget.viewModel.eventsDict.ContainsKey(this.widget.viewModel.eventId)) { eventObj = this.widget.viewModel.eventsDict[this.widget.viewModel.eventId]; } if ((this.widget.viewModel.eventDetailLoading || eventObj?.user == null) && !eventObj.isNotFirst) { return(new EventDetailLoading(mainRouterPop: this.widget.actionModel.mainRouterPop)); } var eventStatus = DateConvert.GetEventStatus(eventObj.begin); return(new Container( color: CColors.White, child: new CustomSafeArea( top: !this._isFullScreen, bottom: !this._isFullScreen, child: new Container( color: this._isFullScreen ? CColors.Black : CColors.White, child: new NotificationListener <ScrollNotification>( onNotification: notification => { if (eventStatus == EventStatus.past && eventObj.record.isEmpty()) { var pixels = notification.metrics.pixels; this._showNavBarShadow = !(pixels >= 44); this.setState(() => { }); return true; } return false; }, child: new Column( children: new List <Widget> { this._buildEventHeader(eventObj, EventType.online, eventStatus, this.widget.viewModel.isLoggedIn), this._buildEventDetail(context, eventObj, EventType.online, eventStatus, this.widget.viewModel.isLoggedIn), this._buildEventBottom(eventObj, EventType.online, eventStatus, this.widget.viewModel.isLoggedIn) } ) ) ) ) )); }
public ActionResult CustomerProfile(int id) { PDBC db = new PDBC(); var AddresList = new List <AddressModel>(); db.Connect(); DataTable dt1 = db.Select("SELECT DISTINCT B.[Ostan_name] , B.[Shahr_Name] as city ,[C_AddressHint],[C_FullAddress] FROM [tbl_Customer_Address] as A inner join [tbl_Enum_Shahr] as B on A.ID_Shahr=B.ID_Shahr where A.id_Customer=" + id); for (int i = 0; i < dt1.Rows.Count; i++) { var model = new AddressModel() { Num = i + 1, Ostan = dt1.Rows[i]["Ostan_name"].ToString(), City = dt1.Rows[i]["city"].ToString(), FullAddress = dt1.Rows[i]["C_FullAddress"].ToString(), HintAddress = dt1.Rows[i]["C_AddressHint"].ToString() }; AddresList.Add(model); } DataTable dt = db.Select("SELECT [id_Customer],[C_regDate],[C_Mobile],[C_FirstName],[C_LastNAme],[C_Description],[C_Email] FROM [tbl_Customer_Main]where id_Customer=" + id); db.DC(); var res = new Admin_CustomerDetail(); if (dt.Rows.Count != 0) { res.Id = Convert.ToInt32(dt.Rows[0]["id_Customer"]); res.Name = dt.Rows[0]["C_FirstName"].ToString(); res.Familly = dt.Rows[0]["C_LastNAme"].ToString(); res.Discription = dt.Rows[0]["C_Description"].ToString(); res.PhoneNum = dt.Rows[0]["C_Mobile"].ToString(); res.Email = dt.Rows[0]["C_Email"].ToString(); res.registerDate = DateConvert.DateReturner(dt.Rows[0]["C_regDate"].ToString(), "ShortDate"); res.Addresses = AddresList; } CustomerModelFiller modelFiller = new CustomerModelFiller(); CustomerProfileModelView Model = new CustomerProfileModelView() { CustomerModel = res, OstanHa = modelFiller.Ostanha() }; return(View(Model)); }
public string AgreePercent_Get(int AgreeID, string VisitDate) { try { ClAgreementPercent cl = new ClAgreementPercent(); cl.AgreementID = AgreeID; cl.VisitDate = DateConvert.sh2m(VisitDate).ToString(); DataSet ds = AgreementPercentClass.GetList(cl); return(ds.GetXml()); } catch { return(null); } }
Widget _buildContentHead() { var user = this.eventObj.user ?? new User(); return(new Container( padding: EdgeInsets.symmetric(horizontal: 16), margin: EdgeInsets.only(top: 16, bottom: 20), child: new Column( crossAxisAlignment: CrossAxisAlignment.start, children: new List <Widget> { new Text( this.eventObj.title ?? "", this.titleKey, style: CTextStyle.H4 ), new Container( margin: EdgeInsets.only(top: 20), child: new Row( children: new List <Widget> { new Container( margin: EdgeInsets.only(right: 8), child: new GestureDetector( onTap: () => this.pushToUserDetail(user.id), child: Avatar.User(user, 32) ) ), new Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: new List <Widget> { new GestureDetector( onTap: () => this.pushToUserDetail(user.id), child: new Text( user.fullName ?? "", style: CTextStyle.PMediumBody ) ), new Text( $"{DateConvert.DateStringFromNow(this.eventObj.createdTime ?? DateTime.Now)}发布", style: CTextStyle.PSmallBody3 ) } ) } ) ) } ) )); }
public void BindGrid() { ClRequestTraffic cl = new ClRequestTraffic(); cl.Firstname = txtname.Text; cl.LastName = txtLastName.Text; cl.fromDate = DateConvert.sh2m(txtFromDate.Text).ToString(); cl.ToDate = DateConvert.sh2m(txtToDate.Text).ToString(); cl.Pelak = CtlPelak.Text.Length > 5 ? CtlPelak.Text : null; cl.CompanyID = Convert.ToInt32(ddcompany.SelectedValue); cl.MelliCode = nationalCode.Text; cl.DiscountType = Convert.ToInt32(ddDiscountype.SelectedValue); cl.RepeatTypeID = Convert.ToInt32(ddRepeatType.SelectedValue); ////cl.FRomOrderDateStart = DateConvert.sh2m(txtFromDateTransaction.Text).ToString(); ////cl.ToOrderDateStart = DateConvert.sh2m(txtToDateTransaction.Text).ToString(); ////cl.GetConfilict = chGetConfilict.Checked == true ? 1 : 0; if (ddRequestStatus.SelectedValue == "-1") { cl.RequestStatus = null; } else { cl.RequestStatus = Convert.ToInt32(ddRequestStatus.SelectedValue); } DataSet ds = RequestTrafficClass.GetListManage(cl); ds.Tables[0].TableName = "DataSource1"; for (int intCount = 0; intCount < ds.Tables[0].Rows.Count; intCount++) { ds.Tables[0].Rows[intCount]["allRequests"] = RetAllRequestDate(Convert.ToInt32(ds.Tables[0].Rows[intCount]["RequestTrafficID"].ToString())); ds.Tables[0].Rows[intCount]["CreateTime"] = DateConvert.m2sh(ds.Tables[0].Rows[intCount]["MiladyDate"].ToString()) + " " + ds.Tables[0].Rows[intCount]["timeOnly"].ToString(); if (ds.Tables[0].Rows[intCount]["d"].ToString() != "") { ds.Tables[0].Rows[intCount]["d"] = DateConvert.m2sh(ds.Tables[0].Rows[intCount]["d"].ToString()); } } Session["data"] = null; Session["data"] = ds; Response.Redirect("~/Manage/ReportView.aspx?RName=Sale"); //f1.Src="~/Manage/ReportView.aspx?RName=Sale.mrt"; //MyIfarm.Attributes.Add("src", "Manage/ReportView.aspx?RName=Sale.mrt"); //MyIfarm.Visible = true; }
protected void btnNew_Click(object sender, EventArgs e) { if (btnNew.Text == "New") { lblMessage.Text = ""; btnNew.Text = "Save"; TextReadFalse(); } else { try { objConnection = new SqlConnection(connStr); string mdate = DateConvert.GetDate(DateTime.Now); string inscmd = "Insert into Blogs (BTitle,BContent,ImageUrl,PostDate,BName) values('" + txtBlogTitle.Text + "','" + txtBContent.Text + "','" + txtBlogImgUrl.Text + "','" + mdate + "','" + txtBName.Text + "')"; objCommand = new SqlCommand(inscmd, objConnection); objConnection.Open(); objCommand.ExecuteNonQuery(); objCommand.Dispose(); objConnection.Close(); lblMessage.Text = "Record Saved !!!"; txtBlogImgUrl.Text = ""; txtBlogTitle.Text = ""; txtBContent.Text = ""; txtBName.Text = ""; } catch (SqlException ex) { lblMessage.Text = "Error in Connection" + ex.Message.ToString(); } catch (Exception ex) { lblMessage.Text = "Error" + ex.Message.ToString(); } finally { btnNew.Text = "New"; TextReadTrue(); } } }